public bool Edit(string id, CategoryModel model)
 {
     return(_res.Edit(id, model));
 }
 public bool Create(CategoryModel model)
 {
     return(_res.Create(model));
 }
 public void CreateCategory(CategoryModel p)
 {
     db.Categories.Create(toCategory(new Category(), p));
     db.Save();
     GetAllCategories();
 }
 private Category toCategory(Category p, CategoryModel i)
 {
     p.Category_PK   = i.Category_PK;
     p.Category_name = i.Category_name;
     return(p);
 }
Exemple #5
0
 public List <IngredientModel> GetIngresInThisType(CategoryModel category)
 {
     return(GetIngresInThisType(category.ID));
 }