コード例 #1
0
        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());
        }
コード例 #2
0
 public Task <IList <Category> > Get(CategorySearchArgs args)
 {
     return(_readonlyCategoryRepository.Get(args));
 }