Identity icon indicating copy to clipboard operation
Identity copied to clipboard

Unable to define Custom RoleClaim due to generic constraint

Open davidgoh opened this issue 10 years ago • 1 comments

public abstract class UserStore<TUser, TRole, TContext, TKey, TUserClaim, TUserRole, TUserLogin, TUserToken> : IUserLoginStore<TUser>, IUserStore<TUser>, IDisposable, 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>

where TRole : IdentityRole<TKey, TUserRole, IdentityRoleClaim<TKey>>

Shouldn't it be TRoleClaim ?

where TRole : IdentityRole<TKey, TUserRole, TRoleClaim >

davidgoh avatar Aug 10 '16 08:08 davidgoh

Dupe of https://github.com/aspnet/Identity/issues/855

HaoK avatar Aug 10 '16 10:08 HaoK