public async Task <ActionResult <Model.Dish> > PostDish(Model.Dish dish) { _context.Dish.Add(dish); await _context.SaveChangesAsync(); return(null); }
public async Task <ActionResult <Model.CookingTime> > PostCookingTime(Model.CookingTime cookingTime) { _context.CookingTime.Add(cookingTime); await _context.SaveChangesAsync(); return(null); }
public async Task <ActionResult <Model.Cousine> > PostCousine(Model.Cousine cousine) { _context.Cousine.Add(cousine); await _context.SaveChangesAsync(); return(null); }
public async Task <ActionResult <Model.Category> > PostCategory(Model.Category category) { _context.Category.Add(category); await _context.SaveChangesAsync(); //return CreatedAtAction("GetCategory", new { id = category.Id }, category); return(null); }
public async Task <ActionResult <Model.Ingredient> > DeleteIngredients(int id) { var ingredients = await _context.Ingredients.FindAsync(id); if (ingredients == null) { return(null); } ingredients.Deleted = true; await _context.SaveChangesAsync(); return(ingredients); }