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 InsertAsync(Seller obj) { _context.Add(obj); _context.SaveChangesAsync(); }