Want PrimaryKey be TKey rather than Int in IdentityUserClaim class.
I want to handle more than 32bit records in AspNetUserClaims table.
Hiding doesn't work acording to #12565
public class CustomIdentityUserClaim : IdentityUserClaim<string>
{
public new string Id { get; set; }
}
so, I want you to change base class (IdentityUserClaim
@ogswr This is documented. If you need more than what is covered by that documentation, then please file an issue on the ASP.NET repo which is where Identity is maintained.
got it. thanks.
@ajcvickers Even after reading all the issues and linked documentation I am still unable to change Id type of IdentityUserClaim can you point me in right direction?
By looking at the IdentityUserClaim implementation I see the you can provide type for UserId but not for Id.
public class IdentityUserClaim<TKey> where TKey : IEquatable<TKey>
{
...
public virtual int Id { get; set; }
public virtual TKey UserId { get; set; }
...
}
but in IdentityUser you can provide type for Id
public class IdentityUser<TKey> where TKey : IEquatable<TKey>
{
...
public virtual TKey Id { get; set; }
...
}
I expect you to advise me to open new issue but please consider that most people googling this problem will end up here after clicking through multiple issues as I did.
@kolpav The identity model does not allow this key type to be changed. You could request this be changed by filing an issue at ASP.NET Core, but it's been like this for a long time and I don't think there are plans to change it.