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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="E13.Common.Logic" Version="2025.117.22" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="E13.Common.Logic" Version="2025.117.22" />
                    
Directory.Packages.props
<PackageReference Include="E13.Common.Logic" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add E13.Common.Logic --version 2025.117.22
                    
#r "nuget: E13.Common.Logic, 2025.117.22"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package E13.Common.Logic@2025.117.22
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=E13.Common.Logic&version=2025.117.22
                    
Install as a Cake Addin
#tool nuget:?package=E13.Common.Logic&version=2025.117.22
                    
Install as a Cake Tool

E13.Common.Logic

NuGet Version License: MIT

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

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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
Loading failed