Browse Source

Mapper for UserId

zinab_elgendy 1 month 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, 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<UserAddress, UserAddressDto>()