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