K-Society Base is a full stack framework is based on .NET to quickly build layered structure, ideal for implementing microservices.
KSociety.Base is a .NET Standard 2.0 framework that can be used to create a clean design by enforcing single responsibility and separation of concerns. Its advanced features are ideal for Domain Driven Design (DDD), Command Query Responsibilty Segragation (CQRS) and Event Sourcing, is an open sourse .NET framework and represents the basic infrastructure. The whole framework is divided into layers listed below.
Visual Studio 2022 with the following installed:
Workloads |
---|
ASP.NET and web development |
.NET desktop development |
- Fork the KSociety.Base repository (https://github.com/K-Society/KSociety.Base.git) into a GitHub domain that you control
- Clone the KSociety.Base repository from your fork (git clone https://github.com/yourdomain/KSociety.Base.git) into the directory of your choice
- Run 'build.cmd' script
Here you can find several examples.
The presentation layer.
GitHub Repository | NuGet | Download |
---|---|---|
KSociety.Base.Pre.Model |
GitHub Repository | NuGet | Download |
---|---|---|
KSociety.Base.Pre.Form.View | ||
KSociety.Base.Pre.Form.Presenter |
The service layer.
GitHub Repository | NuGet | Download |
---|---|---|
KSociety.Base.Srv.Agent | ||
KSociety.Base.Srv.Behavior | ||
KSociety.Base.Srv.Contract | ||
KSociety.Base.Srv.Dto | ||
KSociety.Base.Srv.Shared |
Contains the autofac modules.
GitHub Repository | NuGet | Download |
---|---|---|
KSociety.Base.Srv.Host.Shared |
The application layer, abstraction on the command handler library. Contains the abstraction of the request handlers.
GitHub Repository | NuGet | Download |
---|---|---|
KSociety.Base.App.Shared | ||
KSociety.Base.App.Utility |
GitHub Repository | NuGet | Download |
---|
The domain layer.
GitHub Repository | NuGet | Download |
---|---|---|
KSociety.Base.Domain.Shared |
The infrastructure layer, data access layer (DAL). It also contains the implementation of the UnitOfWork. Supported databases:
- SqlServer
- Sqlite
- MySql
- PostgreSQL
GitHub Repository | NuGet | Download |
---|---|---|
KSociety.Base.Infra.Abstraction | ||
KSociety.Base.Infra.Shared |
The event bus abstraction and RbbitMQ implementation.
GitHub Repository | NuGet | Download |
---|---|---|
KSociety.Base.EventBus | ||
KSociety.Base.EventBusRabbitMQ |
The generic shared library.
GitHub Repository | NuGet | Download |
---|---|---|
KSociety.Base.InfraSub.Shared |
The project is under Microsoft Reciprocal License (MS-RL)
List of technologies, frameworks and libraries used for implementation:
- .NET 8 (platform). Note for Visual Studio users: VS 2022 is required.
- Autofac (Inversion of Control Container)
- AutoMapper (A convention-based object-object mapper)
- CsvHelper (A .NET library for reading and writing CSV files)
- Grpc.Net.Client (.NET client for gRPC)
- MediatR (mediator implementation)
- Polly (Resilience and transient-fault-handling library)
- protobuf-net (protobuf-net is a contract based serializer for .NET code)
- Quartz.NET (Quartz Scheduling Framework for .NET)
- RabbitMQ.Client (The RabbitMQ .NET client is an implementation of an AMQP 0-9-1 client library for C#)
- Serilog (structured logging)
- Microsoft.EntityFrameworkCore.Proxies (Lazy loading proxies for Entity Framework Core.)
- Microsoft.EntityFrameworkCore.Sqlite (SQLite database provider for Entity Framework Core.)
- Microsoft.Extensions.Configuration.Json (JSON configuration provider implementation for Microsoft.Extensions.Configuration.)
- Microsoft.Extensions.Logging.Console (Console logger provider implementation for Microsoft.Extensions.Logging.)
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (ASP.NET Core Identity provider that uses Entity Framework Core.)
- Microsoft.EntityFrameworkCore (Entity Framework Core is a modern object-database mapper for .NET.)
- Microsoft.EntityFrameworkCore.Relational (Shared Entity Framework Core components for relational database providers.)
- Microsoft.EntityFrameworkCore.SqlServer (Microsoft SQL Server database provider for Entity Framework Core.)
- Npgsql.EntityFrameworkCore.PostgreSQL (Npgsql.EntityFrameworkCore.PostgreSQL is the open source EF Core provider for PostgreSQL.)
- Pomelo.EntityFrameworkCore.MySql (Pomelo's MySQL database provider for Entity Framework Core.)