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));
        }
示例#2
0
        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));
        }
示例#3
0
        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));
        }
示例#4
0
 public void InsertDishType(DishType entity)
 {
     _context.Add(entity);
 }