Fixed issues
This commit is contained in:
		| @@ -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(); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -8,8 +8,11 @@ public class PlaceOfWorkProfile : Profile | ||||
| { | ||||
|     public PlaceOfWorkProfile() | ||||
|     { | ||||
|             CreateMap<PlaceOfWorkModel, PlaceOfWork>(MemberList.Destination) | ||||
|                 .ForMember(p => p.Id, | ||||
|                     opts => opts.UseDestinationValue()); | ||||
|         } | ||||
| } | ||||
|         CreateMap<PlaceOfWorkModel, PlaceOfWork>(MemberList.Destination) | ||||
|             .ForMember(p => p.Id, | ||||
|                 opts => opts.UseDestinationValue()) | ||||
|             .ReverseMap(); | ||||
|  | ||||
|         CreateMap<AddressModel, Address>().ReverseMap(); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| using ApplicationLayer.Services.AuthServices.Common; | ||||
| using ApplicationLayer.Services.Users.Models; | ||||
| using AutoMapper; | ||||
| using Domains.Users; | ||||
|  | ||||
| @@ -8,8 +9,10 @@ public class UserProfile : Profile | ||||
| { | ||||
|     public UserProfile() | ||||
|     { | ||||
|             CreateMap<AuthData, User>(MemberList.Destination) | ||||
|                 .ForMember(u => u.Role, | ||||
|                     opts => opts.Ignore()); | ||||
|         } | ||||
| } | ||||
|         CreateMap<AuthData, User>(MemberList.Destination) | ||||
|             .ForMember(u => u.Role, | ||||
|                 opts => opts.Ignore()); | ||||
|  | ||||
|         CreateMap<User, UserModel>(MemberList.Destination); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -9,16 +9,21 @@ public class VisaApplicationProfile : Profile | ||||
| { | ||||
|     public VisaApplicationProfile() | ||||
|     { | ||||
|             CreateMap<VisaApplication, VisaApplicationModelForApplicant>(MemberList.Destination); | ||||
|         CreateMap<VisaApplication, VisaApplicationModelForApplicant>(MemberList.Destination); | ||||
|  | ||||
|             CreateMap<VisaApplication, VisaApplicationModelForAuthority>(MemberList.Destination) | ||||
|                 .ForMember(model => model.Applicant, | ||||
|                     opts => opts.Ignore()); | ||||
|  | ||||
|             CreateMap<VisaApplicationCreateRequest, VisaApplication>(MemberList.Destination) | ||||
|                 .ForMember(va => va.RequestDate, | ||||
|                 opts => opts.Ignore()) | ||||
|                 .ForMember(va => va.ApplicantId, | ||||
|         CreateMap<VisaApplication, VisaApplicationModelForAuthority>(MemberList.Destination) | ||||
|             .ForMember(model => model.Applicant, | ||||
|                 opts => opts.Ignore()); | ||||
|         } | ||||
| } | ||||
|  | ||||
|         CreateMap<VisaApplicationCreateRequest, VisaApplication>(MemberList.Destination) | ||||
|             .ForMember(va => va.RequestDate, | ||||
|                 opts => opts.Ignore()) | ||||
|             .ForMember(va => va.ApplicantId, | ||||
|                 opts => opts.Ignore()); | ||||
|  | ||||
|         CreateMap<PastVisaModel, PastVisa>().ReverseMap(); | ||||
|         CreateMap<PastVisitModel, PastVisit>().ReverseMap(); | ||||
|         CreateMap<ReentryPermitModel, ReentryPermit>().ReverseMap(); | ||||
|         CreateMap<PermissionToDestCountryModel, PermissionToDestCountry>().ReverseMap(); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user