Added mapper

This commit is contained in:
2024-08-23 20:09:41 +03:00
parent e857cca2cf
commit c92855e7ce
9 changed files with 93 additions and 79 deletions

View File

@@ -0,0 +1,20 @@
using ApplicationLayer.Services.AuthServices.Requests;
using AutoMapper;
using Domains.Users;
namespace Infrastructure.Automapper.Profiles
{
public class UserProfile : Profile
{
public UserProfile()
{
CreateMap<RegisterApplicantRequest, User>(MemberList.Destination)
.ForMember(u => u.Role,
opts => opts.Ignore());
CreateMap<RegisterRequest, User>()
.ForMember(u => u.Role,
opts => opts.Ignore());
}
}
}