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