public async Task <IActionResult> Edit(int id, [Bind("MLUId,Age,MLUFrom,MLUTo")] MLU mLU) { if (id != mLU.MLUId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(mLU); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MLUExists(mLU.MLUId)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(mLU)); }
public async Task <IActionResult> Create([Bind("MLUId,Age,MLUFrom,MLUTo")] MLU mLU) { if (ModelState.IsValid) { _context.Add(mLU); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(mLU)); }