public override IEnumerable <RoleModel> GetAll() { return(DataStorageService.GetAllRoles()); }
public bool DuplicateValidate(RoleModel model) { var sameTitleCategoryExists = DataStorageService.GetAllRoles().Any(c => c.RoleName.Equals(model.RoleName, StringComparison.CurrentCultureIgnoreCase) && !c.Id.Equals(model.Id)); return(!sameTitleCategoryExists); }