Skip to content

ASP.NET Core

Martin Havlišta edited this page Aug 30, 2018 · 33 revisions

WORK IN PROGRESS

Follow these steps to use CoreDdd in ASP.NET Core MVC application (tested with Visual Studio 2017 and .NET Core 2.1):

  1. Create a new ASP.NET Core MVC project.
  2. Install CoreDdd.AspNetCore nuget package.
  3. Install CoreDdd.Nhibernate nuget package.
  4. Add services.AddScoped<IUnitOfWork, NhibernateUnitOfWork>(); into Startup.ConfigureServices().
  5. Add services.AddSingleton<TransactionScopeUnitOfWorkMiddleware>(); into Startup.ConfigureServices().
  6. Add app.UseMiddleware<TransactionScopeUnitOfWorkMiddleware>(); into Startup.Configure().

Clone this wiki locally