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