Ok this is quite odd.
// Assembly Microsoft.AspNet.Identity.Core.dll, v2.0.0.0
namespace Microsoft.AspNet.Identity
{
public class RoleManager<TRole> : RoleManager<TRole, string>
where TRole : class, Microsoft.AspNet.Identity.IRole<string>
{
// Summary:
// Constructor
//
// Parameters:
// store:
public RoleManager(IRoleStore<TRole, string> store);
}
}
But that derives from another RoleManager
!
// Assembly Microsoft.AspNet.Identity.Core.dll, v2.0.0.0
namespace Microsoft.AspNet.Identity
{
public class RoleManager<TRole, TKey> : IDisposable
where TRole : class, global::Microsoft.AspNet.Identity.IRole<TKey>
where TKey : global::System.IEquatable<TKey>
{
...
}
}
Maybe the first role manager is some legacy code (string
for Asp.Net Identity 1). Deriving from the second RoleManager
seems to be the way to go:
public class RoleManager : RoleManager<Role, Guid> { ... }