Example #1
0
 public Subcategory GetSubcategory(int id)
 {
     return(Subcategories.First(sub => sub.ID == id));
 }
Example #2
0
 public Category GetCategoryForSubcategory(int id)
 {
     return(Subcategories.First(sub => sub.ID == id)?.Category);
 }
Example #3
0
 public void UpdateSubcategory(Subcategory subcategory)
 {
     Subcategories.Remove(Subcategories.First(sub => sub.ID == subcategory.ID));
     Subcategories.Add(subcategory);
 }