Exemplo n.º 1
0
 public async Task <IActionResult> Edit([FromForm] VehicleManagementEditViewModel inputModel)
 {
     if (ModelState.IsValid)
     {
         return(await _resiliencyHelper.ExecuteResilient(async() =>
         {
             var command = inputModel.MapToUpdateVehicle();
             await _vehicleManagementAPI.UpdateVehicle(command.LicenseNumber, command);
             return RedirectToAction("Index");
         }, View("Offline", new VehicleManagementOfflineViewModel())));
     }
     else
     {
         return(View("Edit", inputModel));
     }
 }