Skip to content

Commit a78f8d7

Browse files
authored
Merge pull request #298 from maliming/issue#297
fix #297 Ignore the audit fields in the update user method Dto CreationTime and LastLoginTime.
2 parents 1094f86 + 9130ea1 commit a78f8d7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/Users/Dto/UserMapProfile.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ public class UserMapProfile : Profile
88
public UserMapProfile()
99
{
1010
CreateMap<UserDto, User>();
11-
CreateMap<UserDto, User>().ForMember(x => x.Roles, opt => opt.Ignore());
11+
CreateMap<UserDto, User>()
12+
.ForMember(x => x.Roles, opt => opt.Ignore())
13+
.ForMember(x => x.CreationTime, opt => opt.Ignore())
14+
.ForMember(x => x.LastLoginTime, opt => opt.Ignore());
1215

1316
CreateMap<CreateUserDto, User>();
1417
CreateMap<CreateUserDto, User>().ForMember(x => x.Roles, opt => opt.Ignore());

0 commit comments

Comments
 (0)