NetActive.CleanArchitecture.Application.EntityFrameworkCore
6.0.7
See the version list below for details.
dotnet add package NetActive.CleanArchitecture.Application.EntityFrameworkCore --version 6.0.7
NuGet\Install-Package NetActive.CleanArchitecture.Application.EntityFrameworkCore -Version 6.0.7
<PackageReference Include="NetActive.CleanArchitecture.Application.EntityFrameworkCore" Version="6.0.7" />
paket add NetActive.CleanArchitecture.Application.EntityFrameworkCore --version 6.0.7
#r "nuget: NetActive.CleanArchitecture.Application.EntityFrameworkCore, 6.0.7"
// Install NetActive.CleanArchitecture.Application.EntityFrameworkCore as a Cake Addin #addin nuget:?package=NetActive.CleanArchitecture.Application.EntityFrameworkCore&version=6.0.7 // Install NetActive.CleanArchitecture.Application.EntityFrameworkCore as a Cake Tool #tool nuget:?package=NetActive.CleanArchitecture.Application.EntityFrameworkCore&version=6.0.7
NetActive.CleanArchitecture
NetActive.CleanArchitecture is a set of libraries supporting Clean Architecture development in .NET (6+).
Source code and examples can be found on GitHub. The NuGet packages, including debug symbols, can be found on NuGet.
Inspired by the video series Clean Architecture: Patterns, Practices and Principles on PluralSight by Matthew Renze, I started creating these libraries around the idea of Clean Architecture a few years ago.
The open source community has given me so much over the past decade, I decided it was time to give something back. Since I find them very practicle and I recently ported them to .NET 6 and Entity Framework Core 6, I felt it was the right time to share these Clean Architecture libraries with the rest of the world.
Focus is on simplifying implementation of and support for these Clean Architecture patterns and practices in new .NET projects. These libraries have already been under active development for a few years and applied in real life production applications many times.
Please check them out and feel free to share your thoughts and ideas by contacting me or submitting a pull request.
Besides the source code you'll also find practicle examples on how to use these libraries in Console applications, Web applications or API's.
Here's a quick example (from the Example.Console.CommandAdd
example project) of what your application code could look like:
using Autofac;
using Example.Application.Manufacturer.Commands.AddManufacturer;
using Example.Application.Manufacturer.Commands.AddManufacturer.Models;
using MediatR;
// Build single-instance DI container.
var builder = new ContainerBuilder();
Example.Shared.AutofacConfig.RegisterComponents(builder, singleInstance: true);
var container = builder.Build();
using (var scope = container.BeginLifetimeScope())
{
// Create manufacturer model.
var manufacturerName = $"My Manufacturer ({DateTime.Now:yyyyMMddHHmmsssmmm})";
var manufacturerToAdd = new AddManufacturerCommandModel(manufacturerName)
{
Contact =
{
FamilyName = "Brink",
GivenName = "Raymond" // Optional
}
};
// Execute add manufacturer command.
var command = new AddManufacturerCommand(manufacturerToAdd);
var result = await scope.Resolve<ISender>().Send(command);
Console.WriteLine($"Added: {result}: {manufacturerToAdd.ManufacturerName}");
Console.WriteLine();
}
Under the hood these libraries try to apply the following principles and patterns:
- Clean Code
- Don't Repeat Yourself
- SOLID:
- Command and Query Responsibility Segregation (CQRS)
- Facade Pattern
- Factory Method Pattern
- Repository and Unit of Work Patterns
If you're a programmer and you haven't heared of these yet, please check out Uncle Bob Martin and Martin Fowler. You might learn a thing or two 😉
Also check out these projects as they are priceless and essential for these libraries to shine:
Happy coding!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net6.0
- Microsoft.EntityFrameworkCore (>= 6.0.12)
- NetActive.CleanArchitecture.Application (>= 6.0.7)
- NetActive.CleanArchitecture.Application.Persistence.Interfaces (>= 6.0.7)
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 |
---|---|---|
6.3.0 | 146 | 9/28/2023 |
6.2.1 | 130 | 9/5/2023 |
6.1.0 | 135 | 8/23/2023 |
6.1.0-alpha.2 | 66 | 8/18/2023 |
6.1.0-alpha.1 | 59 | 8/18/2023 |
6.0.9 | 951 | 4/28/2023 |
6.0.8 | 198 | 3/20/2023 |
6.0.7 | 217 | 2/28/2023 |
6.0.5 | 239 | 2/18/2023 |