feat: add Logs
This commit is contained in:
@@ -4,6 +4,8 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using MediatR;
|
||||
using mws.backend.dotnet.application.Audit;
|
||||
using mws.backend.dotnet.application.Auth;
|
||||
using mws.backend.dotnet.application.Common;
|
||||
using mws.backend.dotnet.application.Documents;
|
||||
@@ -25,7 +27,12 @@ public static class DependencyInjection
|
||||
services.AddScoped<IUnitOfWork, UnitOfWork>();
|
||||
|
||||
services.AddAutoMapper(cfg => { }, typeof(MappingProfile).Assembly);
|
||||
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(IUnitOfWork).Assembly));
|
||||
services.AddMediatR(cfg =>
|
||||
{
|
||||
cfg.RegisterServicesFromAssembly(typeof(IUnitOfWork).Assembly);
|
||||
cfg.AddOpenBehavior(typeof(AuditLogBehavior<,>));
|
||||
});
|
||||
services.AddScoped<IAuditContext, AuditContext>();
|
||||
|
||||
services.AddScoped<IPasswordHasher, BcryptPasswordHasher>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user