Пример #1
0
 private async Task Registrar(RegistrarNovaTaxaCommand request, RegistrarNovaTaxaResponse response)
 {
     try
     {
         await _taxaCobrancaRepository.Registrar(TaxaCobranca);
     }
     catch (Exception ex)
     {
         response.AddError(Errors.General.InternalProcessError("VerficarSegmentoJaRegistrado", ex.Message));
         return;
     }
 }
Пример #2
0
        private async Task <Response> Registrar()
        {
            try
            {
                await _taxaCobrancaRepository.Registrar(TaxaCobranca);
            }
            catch (Exception ex)
            {
                return(Response.Fail(Errors.General.InternalProcessError("VerficarSegmentoJaRegistrado", ex.Message)));
            }

            return(Response.Ok());
        }