コード例 #1
0
 public IEnumerable <SubcategoryId> GetDeleted()
 {
     return(Subcategories
            .Where(subcategory => subcategory.Deleted)
            .Select(x => new SubcategoryId(x.Id))
            .ToList());
 }
コード例 #2
0
 public IEnumerable <Subcategory> GetModified()
 {
     return(Subcategories
            .Where(subcategory => subcategory.Deleted)
            .Select(x => Subcategory.Create(new SubcategoryId(x.Id), x.Name, x.Category))
            .ToList());
 }
コード例 #3
0
 public void Search()
 {
     if (!string.IsNullOrWhiteSpace(SearchText))
     {
         MakeAllCategories(visible: false);
         foreach (var item in Subcategories.Where(x => x.Name.Equals(SearchText) ||
                                                  x.Category.Equals(SearchText)))
         {
             item.Visible = true;
         }
     }
     else
     {
         MakeAllCategories(visible: true);
     }
 }