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; } }
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()); }