Skip to content

Dotnet core startup - Implementation of Unit Of Work pattern with Entity Framework Core in .NET 6

Notifications You must be signed in to change notification settings

mail4hafij/dotnetcore-startup-with-efcore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotnetcore_startup_with_efcore

This is startup project for dotnet core 6. Following features are ready -

  • Request Handler using Mediator pattern.
  • Unit Of Work pattern with Entity Framework Core.
  • Repository pattern.
  • Logic for managing multiple repositories.
  • Linq queryable extension to make paging and sorting easy.
  • Automapper for mapping DB models to contracts.
  • Autofac for dependency injection.

Conceptual Model

Any request from a service (i.e., CoreSerivce - derived from ServiceBase) is handled by HandlerCaller. The HandlerCaller has the responsibility to process a request by finding a RequestHandler from the RequestHandlerFactory. The HandlerCaller then responses to that request from the ResponseFactory. Each RquestHandler creates a unitOfWork from the UnitOfWorkFactory to further process the request and interact with the database.

How to populate database

  • Go to package manager console
  • Set the core project as default
  • Run Add-Migration and provide a version name
  • Run Update-Database

About

Dotnet core startup - Implementation of Unit Of Work pattern with Entity Framework Core in .NET 6

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published