public async Task <IActionResult> Create([Bind("Id,Name")] Department department) { if (ModelState.IsValid) { _context.Add(department); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(department)); }
public async Task <IActionResult> Create([Bind("Id,Name,Email,BirthDate,Salary")] Seller seller) { if (ModelState.IsValid) { _context.Add(seller); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(seller)); }
public async Task <IActionResult> Create([Bind("id,Date,Amount,Status")] SalesRecord salesRecord) { if (ModelState.IsValid) { _context.Add(salesRecord); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(salesRecord)); }