public async Task <IActionResult> Create([Bind("EmployeeId,Fullname,Department,Email,Phone")] Employee employee) { if (ModelState.IsValid) { _context.Add(employee); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(employee)); }
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(SalesRecord obj) { _context.Add(obj); await _context.SaveChangesAsync(); }
public async Task InsertAsync(Seller obj) { _context.Add(obj); await _context.SaveChangesAsync(); }