fix
This commit is contained in:
+10
-5
@@ -45,6 +45,13 @@ using MyOffice.Services.Dashboard;
|
||||
using Services.Account.Domain;
|
||||
using MyOffice.Services.Identity;
|
||||
using AutoMapper;
|
||||
using Models.Motion;
|
||||
|
||||
//TODO: Data.Model only Repository and Service, response <-> mapper <-> web <-> mapper <-> service <-> repository
|
||||
//TODO: Project management
|
||||
//TODO: Model names. Controller = xxxRequest/xxxResponse. Service xxxInput/xxxOutput.
|
||||
//TODO: Validate string as Guid when id
|
||||
//TODO: Logging
|
||||
|
||||
public class Program
|
||||
{
|
||||
@@ -217,14 +224,12 @@ public class Program
|
||||
{
|
||||
builder.Services.AddSingleton(provider => new MapperConfiguration(cfg =>
|
||||
{
|
||||
cfg.AddProfile(new AccountMappingProfile());
|
||||
cfg.AddProfile(new AccountServiceProfile());
|
||||
cfg.AddProfile(new ViewModelProfile());
|
||||
cfg.AddProfile(new AccountViewModelProfile(provider.CreateScope().ServiceProvider.GetService<IContextProvider>()!));
|
||||
}).CreateMapper());
|
||||
|
||||
//builder.Services.AddAutoMapper(typeof(AccountMappingProfile));
|
||||
//builder.Services.AddAutoMapper(typeof(AccountViewModelProfile));
|
||||
//builder.Services.AddAutoMapper(typeof(ViewModelProfile));
|
||||
cfg.AddProfile(new AccountControllerProfile());
|
||||
}).CreateMapper());
|
||||
}
|
||||
|
||||
private static void AddRepositories(WebApplicationBuilder builder)
|
||||
|
||||
Reference in New Issue
Block a user