public async Task <IActionResult> Edit(decimal id, [Bind("Id,Name")] HostVerification hostVerification) { if (id != hostVerification.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(hostVerification); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HostVerificationExists(hostVerification.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(hostVerification)); }
public async Task <IActionResult> Create([Bind("Id,Name")] HostVerification hostVerification) { if (ModelState.IsValid) { _context.Add(hostVerification); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(hostVerification)); }