E13.Common.Logic
2025.117.22
dotnet add package E13.Common.Logic --version 2025.117.22
NuGet\Install-Package E13.Common.Logic -Version 2025.117.22
<PackageReference Include="E13.Common.Logic" Version="2025.117.22" />
<PackageVersion Include="E13.Common.Logic" Version="2025.117.22" />
<PackageReference Include="E13.Common.Logic" />
paket add E13.Common.Logic --version 2025.117.22
#r "nuget: E13.Common.Logic, 2025.117.22"
#:package E13.Common.Logic@2025.117.22
#addin nuget:?package=E13.Common.Logic&version=2025.117.22
#tool nuget:?package=E13.Common.Logic&version=2025.117.22
E13.Common.Logic
Overview
E13.Common.Logic is a package within the E13.Common collection designed for implementing business logic that spans across multiple domains or data layers. It provides a foundation for encapsulating complex business rules and operations in a layered application architecture.
Features
- Logic Interface: Core interface for implementing business logic components
- Context Management: Built-in context handling for managing resources
- Cross-Domain Logic: Support for implementing logic that spans multiple domain entities
- Business Rule Encapsulation: Structure for encapsulating complex business rules
Installation
dotnet add package E13.Common.Logic
Usage
Creating a Logic Component
using E13.Common.Logic;
using Microsoft.EntityFrameworkCore;
// Define a logic component for order processing
public class OrderProcessingLogic : ILogic<MyDbContext>
{
public MyDbContext Context { get; }
public OrderProcessingLogic(MyDbContext context)
{
Context = context;
}
public void ProcessOrder(Order order)
{
// Implement cross-domain business logic
// For example, updating inventory, creating invoices, etc.
// Access multiple repositories or entities through the context
//...
// Save changes
Context.SaveChanges();
}
}
Using the Logic Component
// In a service or controller
public class OrderService
{
private readonly OrderProcessingLogic _orderLogic;
public OrderService(OrderProcessingLogic orderLogic)
{
_orderLogic = orderLogic;
}
public void PlaceOrder(Order order)
{
// Use the logic component to process the order
_orderLogic.ProcessOrder(order);
}
}
Dependencies
- .NET 9.0
Related Packages
E13.Common.Logic is part of the E13.Common collection, which includes:
- E13.Common.Core - Core utilities and base classes
- E13.Common.Domain - Domain layer components
- E13.Common.Data.Db - Database access components
- E13.Common.Api - Web API layer components
- E13.Common.AspNet - ASP.NET shared components
Contributing
Contributions to E13.Common.Logic are welcome. If you have suggestions or improvements, please submit an issue or create a pull request in the GitHub repository.
License
This project is licensed under the MIT License. For more details, see the LICENSE file in the repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2025.117.22 | 169 | 4/27/2025 |
| 2025.114.21 | 224 | 4/24/2025 |
| 2025.114.20 | 226 | 4/24/2025 |
| 2025.114.19 | 221 | 4/24/2025 |
| 2025.114.18 | 239 | 4/24/2025 |
| 2025.112.17 | 241 | 4/22/2025 |
| 2025.112.16 | 233 | 4/22/2025 |
| 2025.111.15 | 252 | 4/21/2025 |
| 2025.106.14 | 247 | 4/16/2025 |
| 2025.106.12 | 278 | 4/16/2025 |
| 2025.97.11 | 260 | 4/7/2025 |
| 2025.96.9 | 244 | 4/6/2025 |
| 2025.96.8 | 243 | 4/6/2025 |
| 2025.91.7 | 225 | 4/1/2025 |
| 2025.91.6 | 229 | 4/1/2025 |
| 2025.90.4 | 236 | 3/31/2025 |
| 2023.30.1 | 433 | 1/30/2023 |
| 2023.18.1 | 395 | 1/18/2023 |
| 2021.324.4 | 1,253 | 11/20/2021 |
| 1.0.0 | 241 | 4/1/2025 |