Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No ApplicationRoleManager class in my MVC 5 Identity 2 project

I am trying to implement roles in a project using VS 2013 Update 2. The project itself is MVC 5 with Identity 2.0... The standard web template that comes out of the box. Yet while going through tutorials online, I keep seeing them reference a ApplicationRoleManager class. This class is not defined by default in my projects, anyone have any ideas why? Or how to fix it?

Update Also in my IdentityConfig.cs class under my App_Start folder, the only classes contained are: .ApplicationUserManager .EmailService .SmsService

like image 340
Ryanb58 Avatar asked Sep 30 '22 04:09

Ryanb58


1 Answers

It's seems it's been a part of one of the versions of mvc template in VS but it's just a shortcut to for RoleManager

public class ApplicationRoleManager : RoleManager<IdentityRole>
{
    public ApplicationRoleManager(IRoleStore<IdentityRole,string> roleStore)
        : base(roleStore)
    {
    }
}
like image 101
lukasz-karolewski Avatar answered Oct 13 '22 00:10

lukasz-karolewski