This commit is contained in:
2023-07-25 22:10:03 +03:00
parent ce2ae68c9f
commit 5ecefe5756
30 changed files with 2321 additions and 123 deletions
+10 -5
View File
@@ -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)