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