Sayeed.Generic.OnionArchitecture
2.0.1
dotnet add package Sayeed.Generic.OnionArchitecture --version 2.0.1
NuGet\Install-Package Sayeed.Generic.OnionArchitecture -Version 2.0.1
<PackageReference Include="Sayeed.Generic.OnionArchitecture" Version="2.0.1" />
paket add Sayeed.Generic.OnionArchitecture --version 2.0.1
#r "nuget: Sayeed.Generic.OnionArchitecture, 2.0.1"
// Install Sayeed.Generic.OnionArchitecture as a Cake Addin
#addin nuget:?package=Sayeed.Generic.OnionArchitecture&version=2.0.1
// Install Sayeed.Generic.OnionArchitecture as a Cake Tool
#tool nuget:?package=Sayeed.Generic.OnionArchitecture&version=2.0.1
Sayeed.Generic.OnionArchitecture
Welcome to Sayeed.Generic.OnionArchitecture, a versatile class library that implements the Onion Architecture pattern and provides generic CRUD (Create, Read, Update, Delete) operations for your ASP.NET Core Web APIs and other applications.
What is Onion Architecture?
Onion Architecture is a software architectural pattern that aims to create a clear separation of concerns in an application. The architecture is built around the core concept of placing the most important business logic and entities at the center (the core), while surrounding it with layers that decrease in importance. These layers include the Domain/Business Layer, Data Access Layer, and Presentation/Controller Layer.
Multi-Database Support
Sayeed.Generic.OnionArchitecture comes with two database provider integration support seamlessly.
SQL Server Integration: Integrate the following code in
Program.cs
to inject SQL Server as the database provider.builder.Services .RegisterSqlServer<AppDbContext>(builder.Configuration) .RegisterGenericRepositoryLayer() .RegisterGenericLogicLayer();
PostgreSQL Integration: Integrate the following code in
Program.cs
to inject PostgreSQL as the database provider.builder.Services .RegisterPostgreSql<AppDbContext>(builder.Configuration) .RegisterGenericRepositoryLayer() .RegisterGenericLogicLayer();
Key Features
Generic Data Layer: The data layer in this library is designed to be generic, allowing you to easily perform CRUD operations on different types of entities without writing repetitive code.
Business Layer: The business layer encapsulates your core application logic and ensures that the data layer operations are done according to your business rules and validations.
Controller Layer: The controller layer handles the presentation and user interface, interacting with the Web API or other application endpoints.
Easy Integration: By inheriting the provided onion layers, you can quickly integrate the generic CRUD operations into your application without having to write the same boilerplate code repeatedly.
Contributing
Thank you for considering contributing to Sayeed.Generic.OnionArchitecture! If you encounter any issues or have ideas for improvement, feel free to open an issue or submit a pull request.
Best regards, Sayeed.
Product | Versions 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. |
-
net8.0
- Microsoft.AspNetCore.Mvc.Core (>= 2.2.5)
- Microsoft.EntityFrameworkCore (>= 8.0.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.0)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 8.0.0)
- System.Data.SqlClient (>= 4.8.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.