Ejemplo n.º 1
0
        public virtual object ExecuteScalar(SqlQuery query)
        {
            if (null == query)
                throw new ArgumentNullException("query");

            OperationResult<Object> result = this.service.ExecuteScalar(query.Serialize());
            DbAccessProxy.TransferParameters(query.Parameters, result.CreateParameterList());

            return result.Value;
        }
Ejemplo n.º 2
0
        public virtual IDataReader CreateDataReader(SqlQuery query, CommandBehavior behavior)
        {
            if (null == query)
                throw new ArgumentNullException("query");

           OperationResult<DataTable> result =  this.service.CreateDataReader(query.Serialize(),behavior);
           DbAccessProxy.TransferParameters(query.Parameters, result.CreateParameterList());

           return result.Value.CreateDataReader();
        }