Fixed issues

This commit is contained in:
2024-08-29 13:18:35 +03:00
parent 4a6b8c902f
commit 8884bac7fd
9 changed files with 79 additions and 43 deletions

View File

@@ -9,11 +9,14 @@ public class ApplicantProfile : Profile
{
public ApplicantProfile()
{
CreateMap<Applicant, ApplicantModel>(MemberList.Destination);
CreateMap<Applicant, ApplicantModel>(MemberList.Destination).ReverseMap();
CreateMap<RegisterApplicantRequest, Applicant>(MemberList.Destination)
.ForMember(a => a.UserId, opts => opts.Ignore())
.ForMember(a => a.Name,
opts => opts.MapFrom(r => r.ApplicantName));
}
}
CreateMap<RegisterApplicantRequest, Applicant>(MemberList.Destination)
.ForMember(a => a.UserId, opts => opts.Ignore())
.ForMember(a => a.Name,
opts => opts.MapFrom(r => r.ApplicantName));
CreateMap<NameModel, Name>().ReverseMap();
CreateMap<PassportModel, Passport>().ReverseMap();
}
}