public IEnumerable <EmpresaTransporteBE> ConsultarEmpresaTransporte(ConsultaEmpresaTransporteRequestDTO request)
        {
            var parameters = new DynamicParameters();

            parameters.Add("EmpresaId", request.EmpresaId);
            parameters.Add("Ruc", request.Ruc);
            parameters.Add("RazonSocial", request.RazonSocial);
            parameters.Add("EstadoId", request.EstadoId);


            using (IDbConnection db = new SqlConnection(_connectionString.Value.CoffeeConnectDB))
            {
                return(db.Query <EmpresaTransporteBE>("uspEmpresaTransporteConsulta", parameters, commandType: CommandType.StoredProcedure));
            }
        }
        public IActionResult ConsultarEmpresaTransporte([FromBody] ConsultaEmpresaTransporteRequestDTO request)
        {
            Guid guid = Guid.NewGuid();

            _log.RegistrarEvento($"{guid.ToString()}{Environment.NewLine}{Newtonsoft.Json.JsonConvert.SerializeObject(request)}");

            ConsultaEmpresaTransporteResponseDTO response = new ConsultaEmpresaTransporteResponseDTO();

            try
            {
                List <EmpresaTransporteBE> lista = _empresaTransporteService.ConsultarEmpresaTransporte(request);

                response.Result.Data = lista;

                response.Result.Success = true;
            }
            catch (ResultException ex)
            {
                response.Result = new Result()
                {
                    Success = true, ErrCode = ex.Result.ErrCode, Message = ex.Result.Message
                };
            }
            catch (Exception ex)
            {
                response.Result = new Result()
                {
                    Success = false, Message = "Ocurrio un problema en el servicio, intentelo nuevamente."
                };
                _log.RegistrarEvento(ex, guid.ToString());
            }

            _log.RegistrarEvento($"{guid.ToString()}{Environment.NewLine}{Newtonsoft.Json.JsonConvert.SerializeObject(response)}");

            return(Ok(response));
        }
        public List <EmpresaTransporteBE> ConsultarEmpresaTransporte(ConsultaEmpresaTransporteRequestDTO request)
        {
            var lista = _IEmpresaTransporteRepository.ConsultarEmpresaTransporte(request);

            return(lista.ToList());
        }