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