public async Task <IList <Category> > Get(CategorySearchArgs args) { var categories = await _fakeDB.CategoriesAsync(); if (args.Id.HasValue) { return(categories.Where(c => c.Id == args.Id).ToList()); } return(categories.Where(c => c.BaseCategoryId == args.BaseCategoryId || c.Name == args.Name).ToList()); }
public Task <IList <Category> > Get(CategorySearchArgs args) { return(_readonlyCategoryRepository.Get(args)); }