public async Task <IActionResult> Create([Bind("Id,Name,Username,Password")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }
public async Task <IActionResult> Create([Bind("Id,Name,UseStatus")] Table table) { if (ModelState.IsValid) { _context.Add(table); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(table)); }
public async Task <IActionResult> Create([Bind("Id,Name,Price,Picture")] MenuItem menuItem) { if (ModelState.IsValid) { _context.Add(menuItem); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(menuItem)); }