public Task <bool> IsInRoleAsync(User user, string roleName) { return(Task.FromResult(RoleExtensions.RoleCheck(roleName).Equals(user.Role.ToString()))); }
public Task AddToRoleAsync(User user, string roleName) //реализация интерфейса IUserRoleStore { user.Role = RoleExtensions.RoleCheck(roleName); return(Task.Run(() => session.SaveOrUpdate(user))); }