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