예제 #1
0
 public override IEnumerable <CategoryModel> GetAll()
 {
     return(DataStorageService.GetAllCategories());
 }
예제 #2
0
        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);
        }