public async Task <IActionResult> Edit(int id, [Bind("IdcarrierNumberException,Priority,Status,FkCarrier,FkExceptionNumber,FkExceptionLcr")] CarrierNumberException carrierNumberException) { if (id != carrierNumberException.IdcarrierNumberException) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(carrierNumberException); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CarrierNumberExceptionExists(carrierNumberException.IdcarrierNumberException)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(carrierNumberException)); }
public async Task <IActionResult> Create([Bind("IdcarrierNumberException,Priority,Status,FkCarrier,FkExceptionNumber,FkExceptionLcr")] CarrierNumberException carrierNumberException) { if (ModelState.IsValid) { _context.Add(carrierNumberException); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(carrierNumberException)); }