public async Task <IActionResult> Update([FromForm] VehicleInsuranceManagementNewViewModel inputModel) { if (ModelState.IsValid) { return(await _resiliencyHelper.ExecuteResilient(async() => { RegisterInsurance cmd = Mapper.Map <RegisterInsurance>(inputModel.Insurance); await _vehicleManagementAPI.UpdateInsurance(cmd); return RedirectToAction("Index"); }, View("Offline", new VehicleInsuranceManagementOfflineViewModel()))); } else { return(View("New", inputModel)); } }
public async Task UpdateInsurance(RegisterInsurance command) { await _client.UpdateInsurance(command); }