public async Task <ApplicationResultModel> GetRolePrevilegesAsync(string roleId) { List <RolePrevilege> rolePrevilegeList = new List <RolePrevilege>(); var myTask = Task.Run(async() => { var role = (await _aspNetRoleRepository.Find(x => x.Id == roleId)).ToList(); if (role.Count() == 0) { return(new ApplicationResultModel { Success = false, Error = ResourceStrings.RoleNotFound }); } return(new ApplicationResultModel { Success = true, Result = null }); }); return(await myTask); }
public AspNetRole GetRoleById(string id) { return(aspNetRoleRepository.Find(id)); }