public async Task <IActionResult> RegisterInsurenceClaim(CreateInsurenceClaimViewModel viewModel) { CreateInsurenceClaimRequest request = new CreateInsurenceClaimRequest() { DriverCPF = viewModel.DriverCPF, InsurenceId = viewModel.InsurenceId, InsurenceClaimDate = viewModel.InsurenceClaimDate, OccurrenceNumber = viewModel.OccurrenceNumber, Observation = viewModel.Observation, InsurenceClaimNumber = viewModel.InsurenceClaimNumber, InsurenceClaimType = viewModel.InsurenceClaimType, CEP = viewModel.CEP, Street = viewModel.Street, Number = viewModel.Number, Neighborhood = viewModel.Neighborhood, City = viewModel.City, UF = viewModel.UF, }; if (await _movtechAPIService.CreateInsurenceClaim(request)) { return(RedirectToAction(nameof(Index))); } else { ModelState.AddModelError("", "Não foi possível Criar o Seguro "); viewModel.Insurences = await _movtechAPIService.GetAllInsurences(); return(View("Create", viewModel)); } }