public async Task RegisterRate(RegisterRate command)
 {
     try
     {
         await _client.RegisterRate(command);
     }
     catch (System.Exception e)
     {
         throw e.InnerException;
     }
 }
Exemple #2
0
 public async Task <IActionResult> Register([FromForm] ContractManagementNewViewModel inputModel)
 {
     if (ModelState.IsValid)
     {
         return(await _resiliencyHelper.ExecuteResilient(async() =>
         {
             RegisterRate cmd = Mapper.Map <RegisterRate>(inputModel.Rate);
             await _contractManagementAPI.RegisterRate(cmd);
             return RedirectToAction("Index");
         }, View("Offline", new ContractManagementOfflineViewModel())));
     }
     else
     {
         return(View("New", inputModel));
     }
 }