ddd-infrastructure-lib 1.1.0

dotnet add package ddd-infrastructure-lib --version 1.1.0
                    
NuGet\Install-Package ddd-infrastructure-lib -Version 1.1.0
                    
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="ddd-infrastructure-lib" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ddd-infrastructure-lib" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="ddd-infrastructure-lib" />
                    
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 ddd-infrastructure-lib --version 1.1.0
                    
#r "nuget: ddd-infrastructure-lib, 1.1.0"
                    
#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 ddd-infrastructure-lib@1.1.0
                    
#: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=ddd-infrastructure-lib&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=ddd-infrastructure-lib&version=1.1.0
                    
Install as a Cake Tool

ddd-infrastucture-lib

Boiler plate code for the Infrastructure layer in a Domain Driven Design project. This library provides scaffolds with synchronous and asynchronous methods for:

  • Abstraction of logging
  • Data Access Objects (DAOs)
  • Aspect Oriented Programming (AOP)
  • Remoting

Goal of this library is to provide reusable and extendable code for common infrastructure tasks and to enable Domain Driven Design best practices. This is achieved by e.g. using Data Access Objects (DAOs) to abstract data access logic from the domain layer, allowing to switch between different data storage technologies without affecting the domain logic. When applied correctly, simply changing the derived classes should be enough. This way developers can start implementing with lean mocks that e.g. simply stored data in memory and later switch to more complex implementations that interact with real databases or remote services.

Content

For the scaffolds mentioned above, the library provides the following classes and interfaces.

Logging

Interfaces and classes for logging are located in the namespace com.schoste.ddd.Infrastructure.V1.Logging. The interfaces, classes and their concepts are used by other parts of the library (e.g., AOP aspects) and can also be used directly in the application code. This feature can be used in combination with Aspect Oriented Programming (AOP).

  • ILogger: An interface defining methods for logging messages with different severity levels (Info, Warning, Error).
  • Log: An abstract class providing a singleton instance to the concrete implementation of the ILogger interface. The actual logging implementation must be provided in a derived class and assigned to the Instance property by implementing the Log.Initialize(ILogger logger) method.

Data Access Objects (DAOs)

Interfaces and classes for managing data access operations are located in the namespace com.schoste.ddd.Infrastructure.V1.DAL.

  • IDataAccessObject<T>: An interface defining synchronous and asynchronous CRUD operations for a generic type T.
  • DataAccessObject<T>: An abstract class implementing the management logic for the IDataAccessObject<T> interface. The actual implementation of data access logic (e.g., database interactions) must be provided in derived classes.

Aspect Oriented Programming (AOP)

Interfaces and classes for managing data access operations are located in the namespace com.schoste.ddd.Infrastructure.V1.Aspects. The AOP feature is enabled by creating objects via the com.schoste.ddd.Infrastructure.V1.Shared.Services.ObjectFactory class and attributes which implement the com.schoste.ddd.Infrastructure.V1.Aspects.IMethodAspect interface.

  • IMethodAspect: An interface defining methods for pre- and post-execution logic around method calls.
  • LoggedAspect: An implementation for the IMethodAspect interface to provide logging functionality. The logging information are written to any implementation of the com.schoste.ddd.Infrastructure.V1.Logging.ILogger interface which is referenced by com.schoste.ddd.Infrastructure.V1.Logging.Log.Instance.
  • RemotedAspect: An implementation for the IMethodAspect interface to enable remote method calls in a way, that makes the implementation seemingly similar to local method calls. The remote calls are handled by the implementation of the com.schoste.ddd.Infrastructure.V1.Remoting.IRemotingClient interface for the client side (caller / recipient of the method's return values) and the com.schoste.ddd.Infrastructure.V1.Remoting.IRemotingServer interface for the server side (callee / executor of methods).

Remoting

Interfaces and classes for managing remote method calls are located in the namespace com.schoste.ddd.Infrastructure.V1.Remoting. This feature uses the Aspect Oriented Programming (AOP).

  • IRemotingClient: An interface defining methods for invoking remote method calls synchronously and asynchronously.
  • RemotingClient: An abstract class implementing the management logic for the IRemotingClient interface. It handles the serialization of method parameters and and deserialization return values. The actual implementation of the communication logic (e.g., via HTTP, TCP, etc.) must be provided in derived classes.
  • IRemotingServer: An interface defining methods for registering and handling remote method calls.
  • RemotingServer: An abstract class implementing the management logic for the IRemotingServer interface. It handles the deserialization of incoming method calls and the serialization of return values. The actual implementation of the communication logic (e.g., via HTTP, TCP, etc.) must be provided in derived classes.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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.
  • net8.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
1.1.0 110 3/8/2026
1.0.0 319 3/23/2025