public async Task <IActionResult> Create([Bind("SubDishTypeID,SubType")] SubDishType subDishType) { if (ModelState.IsValid) { _context.Add(subDishType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(subDishType)); }
public async Task <IActionResult> Create([Bind("IngredientTypeID,Name,UnitSingular,UnitPlural")] IngredientType ingredientType) { if (ModelState.IsValid) { _context.Add(ingredientType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(ingredientType)); }
public async Task <IActionResult> Create([Bind("TableID,Capacity")] Table table) { if (ModelState.IsValid) { _context.Add(table); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(table)); }
public void InsertDishType(DishType entity) { _context.Add(entity); }