public void Add(MealCategory category) { context.Categories.Add(category); context.SaveChanges(); }
public bool AddMealCategory(MealCategory mo) { _dbContext.Add(mo); return(_dbContext.SaveChanges() > 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)); }
public JsonResult Category(MealCategory category) { return(Json(_dataAccessProvider.GetList <Consumable>(DatabaseConfiguration.ConsumableEntity, new BsonDocument("MealCategory", category)))); }