Loosen constraints on stores

Fixes https://github.com/aspnet/Identity/issues/323
This commit is contained in:
Hao Kung 2015-02-06 13:13:45 -08:00
parent f7dd913c3f
commit d45b796529
2 changed files with 6 additions and 6 deletions

View File

@ -13,13 +13,13 @@ using Microsoft.Data.Entity.Update;
namespace Microsoft.AspNet.Identity.EntityFramework
{
public class RoleStore<TRole> : RoleStore<TRole, DbContext, string>
where TRole : IdentityRole
where TRole : IdentityRole<string>
{
public RoleStore(DbContext context, IdentityErrorDescriber describer = null) : base(context, describer) { }
}
public class RoleStore<TRole, TContext> : RoleStore<TRole, TContext, string>
where TRole : IdentityRole
where TRole : IdentityRole<string>
where TContext : DbContext
{
public RoleStore(TContext context, IdentityErrorDescriber describer = null) : base(context, describer) { }

View File

@ -13,20 +13,20 @@ using Microsoft.Data.Entity.Update;
namespace Microsoft.AspNet.Identity.EntityFramework
{
public class UserStore : UserStore<IdentityUser>
public class UserStore : UserStore<IdentityUser<string>>
{
public UserStore(DbContext context, IdentityErrorDescriber describer = null) : base(context, describer) { }
}
public class UserStore<TUser> : UserStore<TUser, IdentityRole, DbContext>
where TUser : IdentityUser, new()
where TUser : IdentityUser<string>, new()
{
public UserStore(DbContext context, IdentityErrorDescriber describer = null) : base(context, describer) { }
}
public class UserStore<TUser, TRole, TContext> : UserStore<TUser, TRole, TContext, string>
where TUser : IdentityUser, new()
where TRole : IdentityRole, new()
where TUser : IdentityUser<string>, new()
where TRole : IdentityRole<string>, new()
where TContext : DbContext
{
public UserStore(TContext context, IdentityErrorDescriber describer = null) : base(context, describer) { }