aspnet/Identity

Can't use GUID identifier on IdentityRoleClaim and IdentityUserClaim

dragankae opened this issue · 2 comments

I'm not able to use GUID identifier on IdentityRoleClaim and IdentityUserClaim classes. TKey is not set on the Id.

capture

Looks like you would need to override Id with TKey or whatever data type you want to use and potentially create a constructor to initialize the variable. Deriving this would also require that you create derived instances of the stores and manager as well. Is there a specific reason why you need this PK to be a different data type? Also, are there instances where the data type would be different that of TKey.

I wanted to use Guid types for my identifiers and I noticed that TKey is not set on the Id in IdentityRoleClaim and IdentityUserClaim while is set on IdentityRole and IdentityUser. That kind a confused me, but anyway i will try with your suggestion with overriding.