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