Пример #1
0
        public QueryResult Handle(ListarTransporteParameter parameters)
        {
            using (var connection = ConnectionFactory.CreateFromUserSession())
            {
                var parametros = new DynamicParameters();


                var resultado = new ListarTransporteResult
                {
                    Hits = connection.Query <ListarTransporteDto>
                           (
                        "despacho.pa_listrartransportista",
                        parametros,
                        commandType: CommandType.StoredProcedure
                           ),
                };
                return(resultado);
            }
        }
        public QueryResult Handle(ListarTransporteParameter parameters)
        {
            using (var connection = (SqlConnection)ConnectionFactory.CreateFromUserSession())
            {
                var parametros = new DynamicParameters();

                parametros.Add("mot_int_id", dbType: DbType.String, direction: ParameterDirection.Input, value: parameters.mot_int_id);
                var resultado = new ListarTransporteResult
                {
                    Hits = connection.Query <ListarTransporteDto>
                           (
                        "delivery.pa_listarTransporte",
                        parametros,
                        commandType: CommandType.StoredProcedure
                           ),
                };

                return(resultado);
            }
        }