Browse Source

Mapper for UserId

zinab_elgendy 2 weeks ago
parent
commit
44a211b485
1 changed files with 2 additions and 1 deletions
  1. 2 1
      MTWorkHR.Application/Mapper/MappingProfile.cs

+ 2 - 1
MTWorkHR.Application/Mapper/MappingProfile.cs

@@ -54,7 +54,8 @@ namespace MTWorkHR.Application.Mapper
             CreateMap<UserBasicInfoDto, ApplicationUser>().ReverseMap();
             CreateMap<UserBasicInfoDto, ApplicationUser>().ReverseMap();
             CreateMap<UserBasicInfoDto, UserDto>().ReverseMap();
             CreateMap<UserBasicInfoDto, UserDto>().ReverseMap();
 
 
-            CreateMap<ApplicationUser, ChatUserDto>().ReverseMap();
+            CreateMap<ApplicationUser, ChatUserDto>()
+            .ForMember(s => s.UserId, o => o.MapFrom(s => s.Id )).ReverseMap();
             
             
             CreateMap<AttachmentDto, UserAttachment>().ReverseMap();
             CreateMap<AttachmentDto, UserAttachment>().ReverseMap();
             CreateMap<UserAddress, UserAddressDto>()
             CreateMap<UserAddress, UserAddressDto>()