public async Task <IActionResult> Create([Bind("ID,Administrator,RowVersion,FirstName,LastName,PhoneNumber,Email")] 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,Description,Price")] Product product) { if (ModelState.IsValid) { _context.Add(product); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(product)); }
public async Task <IActionResult> Create([Bind("ID,Active,RowVersion")] Subscriber subscriber) { if (ModelState.IsValid) { _context.Add(subscriber); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(subscriber)); }
public async Task <IActionResult> Create([Bind("ID,Email,PhoneNumber,FirstName,LastName,Active")] Subscriber subscriber) { if (ModelState.IsValid) { _context.Add(subscriber); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(subscriber)); }