public override Task <IdentityResult> AddToRoleAsync(string userId, string roleId) { try { using (var ctx = new ExtendedUserDbContext()) { ctx.ApplicationUserRole.Add(new ApplicationUserRole { UserId = userId, RoleId = roleId }); ctx.SaveChanges(); } return(Task.FromResult(new IdentityResult() { })); } catch (Exception ex) { return(Task.FromResult(new IdentityResult(ex.Message))); } }