0
maharatha created
We use the latest version of Angular and .NET Core.
We have a requirement where is we have to display the number of users and number of users in each role for each tenant in the Tenant List. This could be an expensive operation, so we want to add this column to existing Tenant Grid however asynchronously load these columns.
Could you recommend some good approach on how to do it ?
1 Answer(s)
-
0
Hi @maharatha,
Instead of async loading of columns, I would follow this approach;
- Extend UserAccount entity as explained here https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Extending-Existing-Entities-Core-Angular and Roles field to store Roles of a user
- Create a similar class to https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Zero.Common/Authorization/Users/UserAccountSynchronizer.cs and also update Roles of a
UserAccount
entity. - Then, when querying the Tenants, you can easily join it with UserAccounts table.