Füge DI-Erweiterungsmethode hinzu, um AutoMapper-Profile, Repositorys und Services für die UserManager-Anwendung zu konfigurieren.
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DigitalData.UserManager.Application.MappingProfiles;
|
||||
using DigitalData.UserManager.Application.Contracts;
|
||||
using DigitalData.UserManager.Application.Services;
|
||||
using DigitalData.UserManager.Infrastructure.Repositories;
|
||||
using DigitalData.UserManager.Infrastructure.Contracts;
|
||||
using DigitalData.UserManager.Application;
|
||||
using DigitalData.Core.Application;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using NLog.Web;
|
||||
@@ -59,27 +56,8 @@ try {
|
||||
});
|
||||
});
|
||||
|
||||
builder.Services.AddAutoMapper(typeof(UserMappingProfile).Assembly);
|
||||
builder.Services.AddAutoMapper(typeof(GroupMappingProfile).Assembly);
|
||||
builder.Services.AddAutoMapper(typeof(GroupOfUserMappingProfile).Assembly);
|
||||
builder.Services.AddAutoMapper(typeof(ModuleMappingProfile).Assembly);
|
||||
builder.Services.AddAutoMapper(typeof(ModuleOfUserMappingProfile).Assembly);
|
||||
builder.Services.AddAutoMapper(typeof(UserRepMappingProfile).Assembly);
|
||||
//builder.Services.AddAutoMapper(typeof(DirectoryMappingProfile).Assembly);
|
||||
|
||||
builder.Services.AddScoped<IUserRepository, UserRepository>();
|
||||
builder.Services.AddScoped<IGroupRepository, GroupRepository>();
|
||||
builder.Services.AddScoped<IGroupOfUserRepository, GroupOfUserRepository>();
|
||||
builder.Services.AddScoped<IModuleRepository, ModuleRepository>();
|
||||
builder.Services.AddScoped<IModuleOfUserRepository, ModuleOfUserRepository>();
|
||||
builder.Services.AddScoped<IUserRepRepository, UserRepRepository>();
|
||||
|
||||
builder.Services.AddScoped<IUserService, UserService>();
|
||||
builder.Services.AddScoped<IGroupService, GroupService>();
|
||||
builder.Services.AddScoped<IGroupOfUserService, GroupOfUserService>();
|
||||
builder.Services.AddScoped<IModuleService, ModuleService>();
|
||||
builder.Services.AddScoped<IModuleOfUserService, ModuleOfUserService>();
|
||||
builder.Services.AddScoped<IUserRepService, UserRepService>();
|
||||
builder.Services.AddUserManager();
|
||||
|
||||
builder.Services.AddDirectorySearchService();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user