0
nhontran created
- ABP Framework version: v3.3.2
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:"
Hi, I have overridden the CreateAsync method in IdentityUserAppService, and added an extra property named "isActiveDirectory":
public override async Task<IdentityUserDto> CreateAsync(IdentityUserCreateDto input)
{
...
user.SetProperty(IsActiveDirectoryPropertyName, isActiveDirectory);
...
}
the extra property has been added successfully in db:

However, when we retrieve the mapping userDto, the ExtraProperties returned null
var userDto = ObjectMapper.Map<IdentityUser, IdentityUserDto>(user);
user.MapExtraPropertiesTo(userDto);
return userDto;
Could you please help me check?
Thank you.
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
4 Answer(s)
-
0
hi
https://docs.abp.io/en/abp/latest/Object-Extensions#mapextrapropertiesto https://docs.abp.io/en/abp/latest/Object-Extensions#automapper-integration
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hi maliming, I have implemented as the guide but it does not work.
If you look at my post, I already called the MapExtraPropertiesTo method:
user.MapExtraPropertiesTo(userDto);I also added the mapping in the Mapper Profile:
CreateMap<IdentityUser, IdentityUserDto>().MapExtraProperties();Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
