Identity: UserStore missing a generic parameter 'TRoleClaim'

Created on 3 Jun 2016  路  11Comments  路  Source: aspnet/Identity

This abstract class (UserStore<TUser, TRole, TContext, TKey, TUserClaim, TUserRole, TUserLogin, TUserToken>) looks like missing a generic parameter 'TRoleClaim'.

dev branch

public abstract class UserStore<TUser, TRole, TContext, TKey, TUserClaim, TUserRole, TUserLogin, TUserToken> :
    IUserLoginStore<TUser>,
    IUserRoleStore<TUser>,
    IUserClaimStore<TUser>,
    IUserPasswordStore<TUser>,
    IUserSecurityStampStore<TUser>,
    IUserEmailStore<TUser>,
    IUserLockoutStore<TUser>,
    IUserPhoneNumberStore<TUser>,
    IQueryableUserStore<TUser>,
    IUserTwoFactorStore<TUser>,
    IUserAuthenticationTokenStore<TUser>
    where TUser : IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>
    where TRole : IdentityRole<TKey, TUserRole, IdentityRoleClaim<TKey>>
    where TContext : DbContext
    where TKey : IEquatable<TKey>
    where TUserClaim : IdentityUserClaim<TKey>
    where TUserRole : IdentityUserRole<TKey>
    where TUserLogin : IdentityUserLogin<TKey>
    where TUserToken : IdentityUserToken<TKey>
{...}

I guess so

public abstract class UserStore<TUser, TRole, TContext, TKey, TUserClaim, TUserRole, TUserLogin, TUserToken, TRoleClaim> :
    IUserLoginStore<TUser>,
    IUserRoleStore<TUser>,
    IUserClaimStore<TUser>,
    IUserPasswordStore<TUser>,
    IUserSecurityStampStore<TUser>,
    IUserEmailStore<TUser>,
    IUserLockoutStore<TUser>,
    IUserPhoneNumberStore<TUser>,
    IQueryableUserStore<TUser>,
    IUserTwoFactorStore<TUser>,
    IUserAuthenticationTokenStore<TUser>
    where TUser : IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin>
    where TRole : IdentityRole<TKey, TUserRole, TRoleClaim>
    where TContext : DbContext
    where TKey : IEquatable<TKey>
    where TUserClaim : IdentityUserClaim<TKey>
    where TUserRole : IdentityUserRole<TKey>
    where TUserLogin : IdentityUserLogin<TKey>
    where TUserToken : IdentityUserToken<TKey>
    where TRoleClaim : IdentityRoleClaim<TKey>
{...}
bug 3 - Done

Most helpful comment

Any idea on when a 1.1.0 release is coming out? Just ran into this wall and it _appears_ I have no workarounds for customizing Identities to this extent. Will there be a 1.0.1 to fix this?

All 11 comments

@divega RTM or 1.0.1?

Wouldn't be a breaking change to do it later?

Depends on how we did it, if we added a new class and kept the old one I guess not

@HaoK 1.0.1 Released?If not,how to solve this problem now.Thank you

@divega we should discuss how we want to fix this soon

1a0cd3c4d15be988abefd889853b0c6d973db9f4

Any idea on when a 1.1.0 release is coming out? Just ran into this wall and it _appears_ I have no workarounds for customizing Identities to this extent. Will there be a 1.0.1 to fix this?

One question i have, Why does the makegeneric always dies with violation error no matter if we fixed the GenericTypes... This happens for the AddEntityFrameworkStores function.

AddEntityFrameworkStores only works with the `UserStore types, while you are using the base class that allows you to specify more entity types. You just need to manually add your store instead of using the helper.

services.AddScoped<IUserStore<TUser>, YourCustomStore>()

What happened with this bug.I'm extending Identity(so obviously also implementing UserStore) with Microsoft.AspNetCore.Identity.EntityFrameworkCore v 1.1.1 and this is still there. I'm really stuck at this point and can't get a workaround as it's not possible to bypass.Any suggestions or comments when and how it will be fixed?

It's fixed. follow this thread.

Was this page helpful?
0 / 5 - 0 ratings