public async Task <IActionResult> Edit(int id, [Bind("Id,Temperature,Duration,Cycles")] Denaturation denaturation) { if (id != denaturation.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(denaturation); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DenaturationExists(denaturation.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(denaturation)); }
public async Task <IActionResult> Create([Bind("Id,Temperature,Duration,Cycles")] Denaturation denaturation) { if (ModelState.IsValid) { _context.Add(denaturation); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(denaturation)); }