public AuthController(IToDoApp db, IHttpContextAccessor httpContext) : base(httpContext) { _db = db; // Get the role manager from the session _roleMgr = GetSessionData <RoleManager>(RoleMgrKey); // If it does not exist on the session then add it if (_roleMgr == null) { // Since the role manager is being created then a user still needs to be authenticated _roleMgr = new RoleManager(null); SetSessionData(RoleMgrKey, _roleMgr); } }
public RoleController(IToDoApp db) { _db = db; }
public UserController(IToDoApp db, IHttpContextAccessor httpContext) : base(db, httpContext) { }
public ToDoApp(IToDoApp database) { _database = database; _roleMgr = new RoleManager(null); }