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