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));
     }
 }
Exemplo n.º 2
0
 public async Task RegisterInsurance(RegisterInsurance command)
 {
     await _client.RegisterInsurance(command);
 }