public IEnumerable <SubcategoryId> GetDeleted() { return(Subcategories .Where(subcategory => subcategory.Deleted) .Select(x => new SubcategoryId(x.Id)) .ToList()); }
public IEnumerable <Subcategory> GetModified() { return(Subcategories .Where(subcategory => subcategory.Deleted) .Select(x => Subcategory.Create(new SubcategoryId(x.Id), x.Name, x.Category)) .ToList()); }
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); } }