Added validation and fixed errors

This commit is contained in:
2024-08-25 19:49:28 +03:00
parent c92855e7ce
commit 00aa3ab6af
43 changed files with 621 additions and 147 deletions

View File

@@ -1,4 +1,5 @@
using ApplicationLayer.Services.Applicants.Models;
using ApplicationLayer.Services.AuthServices.Requests;
using AutoMapper;
using Domains.ApplicantDomain;
@@ -9,6 +10,11 @@ namespace Infrastructure.Automapper.Profiles
public ApplicantProfile()
{
CreateMap<Applicant, ApplicantModel>(MemberList.Destination);
CreateMap<RegisterApplicantRequest, Applicant>(MemberList.Destination)
.ForMember(a => a.UserId, opts => opts.Ignore())
.ForMember(a => a.Name,
opts => opts.MapFrom(r => r.ApplicantName));
}
}
}