ABP Framework version: 5.2.1
UI type: Blazor server
DB provider: EF Core
Hi I have created some properties in Identity User and it is saving working. but In my other microservice i am handling its create/update event handler using UserEto. Now the issue is that event handling is working fine but it not giving my additional propteries because UserEto is implementing IuserData which has does not have my additional properties. please suggest how and where should i update the changes.
8 Answer(s)
-
0
hi
We will make UserEto class inherit
IHasExtraProperties
.https://github.com/abpframework/abp/pull/12597
-
0
You can also customize the ETO class.
See https://docs.abp.io/en/abp/latest/Distributed-Event-Bus#event-transfer-object
https://github.com/abpframework/abp/blob/e499f40fc1e7f041def67b6bf8d30d5b337c4b54/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs#L39 https://github.com/abpframework/abp/blob/e3e1779de6df5d26f01cdc8e99ac9cbcb3d24d3c/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDomainMappingProfile.cs#L10
-
0
Do i need to add AbpIdentityDomainModule module in my project
-
0
You can configure it in the Identity microservice.
-
0
Ok Thanks. let me try
-
0
ok
-
0
Unable to create user after adding
Configure<AbpDistributedEntityEventOptions>(options => { options.EtoMappings.Add<IdentityUser, UserEto>(typeof(AbpIdentityDomainModule)); //options.EtoMappings.Add<IdentityClaimType, IdentityClaimTypeEto>(typeof(AbpIdentityDomainModule)); //options.EtoMappings.Add<IdentityRole, IdentityRoleEto>(typeof(AbpIdentityDomainModule)); //options.EtoMappings.Add<OrganizationUnit, OrganizationUnitEto>(typeof(AbpIdentityDomainModule)); options.AutoEventSelectors.Add<IdentityUser>(); //options.AutoEventSelectors.Add<IdentityRole>(); });
This is giving error while creating user something related to method invocation
-
0
This is giving error while creating user something related to method invocation
What's the error?
You need to use
YourUserEto
that contains your custom properties,options.EtoMappings.Add<IdentityUser, YourUserEto>(typeof(AbpIdentityDomainModule));