Пример #1
0
 public void Add(MealCategory category)
 {
     context.Categories.Add(category);
     context.SaveChanges();
 }
 public bool AddMealCategory(MealCategory mo)
 {
     _dbContext.Add(mo);
     return(_dbContext.SaveChanges() > 0);
 }
Пример #3
0
 public DayMeal GetByValues(int did, int mid, MealCategory cat)
 {
     return(db.Set <DayMeal>().FirstOrDefault(dm => dm.DayId == did && dm.MealId == mid && dm.Category == cat));
 }
Пример #4
0
 public JsonResult Category(MealCategory category)
 {
     return(Json(_dataAccessProvider.GetList <Consumable>(DatabaseConfiguration.ConsumableEntity, new BsonDocument("MealCategory", category))));
 }