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);
 }