示例#1
0
		internal ObjectHolder(Internals.Context context, Type type, object key) {
			this.context = context;
			this.type = type;
			this.selectSP = null;
			// DBNull Bug-Fix by Gerrod Thomas (http://www.Gerrod.com)
			this.key = (key is System.DBNull ? null : key);
		}
示例#2
0
		internal ObjectHolder(Internals.Context context, SelectProcedure selectSP) {
			this.context = context;
			this.type = selectSP.ObjectType;
			this.selectSP = selectSP;
			// DBNull Bug-Fix by Gerrod Thomas (http://www.Gerrod.com)
			this.key = (selectSP.ParameterValue(0) is System.DBNull ? null : selectSP.ParameterValue(0));
		}
示例#3
0
 internal ObjectHolder(Internals.Context context, Type type, object key)
 {
     this.context  = context;
     this.type     = type;
     this.selectSP = null;
     // DBNull Bug-Fix by Gerrod Thomas (http://www.Gerrod.com)
     this.key = (key is System.DBNull ? null : key);
 }
示例#4
0
 internal ObjectHolder(Internals.Context context, SelectProcedure selectSP)
 {
     this.context  = context;
     this.type     = selectSP.ObjectType;
     this.selectSP = selectSP;
     // DBNull Bug-Fix by Gerrod Thomas (http://www.Gerrod.com)
     this.key = (selectSP.ParameterValue(0) is System.DBNull ? null : selectSP.ParameterValue(0));
 }
示例#5
0
		internal ObjectReader(Internals.Context context, SelectProcedure selectProcedure, bool firstLevel) {
			this.context = context;
			this.firstLevel = firstLevel;
			this.objectType = selectProcedure.ObjectType;
			this.pageIndex = 1;
			this.hasEvents = context.Mappings[this.objectType.ToString()].HasEvents;
			
			this.selectProcedure = selectProcedure;
			this.data = context.Connection.GetDataReader(this.objectType, CommandInfo.Select, out this.command, selectProcedure.ProcedureName, selectProcedure.parameters);
			this.firstRead = true;
			if (this.data != null) this.hasObjects = this.data.Read();
			if (!this.hasObjects) this.Close();
		}
示例#6
0
        internal ObjectReader(Internals.Context context, SelectProcedure selectProcedure, bool firstLevel)
        {
            this.context    = context;
            this.firstLevel = firstLevel;
            this.objectType = selectProcedure.ObjectType;
            this.pageIndex  = 1;
            this.hasEvents  = context.Mappings[this.objectType.ToString()].HasEvents;

            this.selectProcedure = selectProcedure;
            this.data            = context.Connection.GetDataReader(this.objectType, CommandInfo.Select, out this.command, selectProcedure.ProcedureName, selectProcedure.parameters);
            this.firstRead       = true;
            if (this.data != null)
            {
                this.hasObjects = this.data.Read();
            }
            if (!this.hasObjects)
            {
                this.Close();
            }
        }
示例#7
0
 /// <summary>
 ///     Get a Raw DataSet where may be Needed
 /// </summary>
 /// <param name="dataSet">
 ///     The typed dataset to populate with the resultset
 /// </param>
 /// <param name="selectProcedure" type="Wilson.ORMapper.SelectProcedure">
 ///     A SelectProcdure instance used to define the stored procedure call
 /// </param>
 /// <returns>
 ///      A System.Data.DataSet object instance
 /// </returns>
 public DataSet GetDataSet(DataSet dataSet, SelectProcedure selectProcedure)
 {
     return this.context.Connection.TransactionDataSet(this.id, selectProcedure.ObjectType, CommandInfo.DataSet, this.transaction, dataSet, selectProcedure.ProcedureName, selectProcedure.parameters);
 }
示例#8
0
 /// <summary>
 ///     Get a Raw DataSet where may be Needed
 /// </summary>
 /// <param name="selectProcedure" type="Wilson.ORMapper.SelectProcedure">
 ///     A SelectProcdure instance used to define the stored procedure call
 /// </param>
 /// <returns>
 ///      A System.Data.DataSet object instance
 /// </returns>
 public DataSet GetDataSet(SelectProcedure selectProcedure)
 {
     return this.GetDataSet(null, selectProcedure);
 }
示例#9
0
 /// <summary>
 ///     Efficiently Retrieve a Single Value
 /// </summary>
 /// <param name="selectProcedure" type="string">
 ///     The SelectProcedure to execute
 /// </param>
 /// <returns>
 ///     The first column of the first row
 /// </returns>
 public object ExecuteScalar(SelectProcedure selectProcedure)
 {
     return this.context.Connection.TransactionScalar(this.id, selectProcedure.ObjectType, CommandInfo.GetScalar, this.transaction,
         selectProcedure.ProcedureName, selectProcedure.parameters);
 }
示例#10
0
 internal ObjectList(Internals.Context context, SelectProcedure selectSP)
 {
     this.context = context;
     this.type = selectSP.ObjectType;
     this.selectSP = selectSP;
 }
示例#11
0
 internal ObjectReader(Internals.Context context, SelectProcedure <T> selectProcedure, bool firstLevel)
     : base(context, selectProcedure, firstLevel)
 {
 }
示例#12
0
 internal ObjectHolder(Internals.Context context, SelectProcedure <T> selectSP)
     : base(context, selectSP)
 {
 }
示例#13
0
 /// <summary>
 ///     Efficiently Retrieve a Single Value
 /// </summary>
 /// <param name="selectProcedure" type="string">
 ///     The SelectProcedure to execute
 /// </param>
 /// <returns>
 ///     The first column of the first row
 /// </returns>
 public object ExecuteScalar(SelectProcedure selectProcedure)
 {
     return(this.context.Connection.TransactionScalar(this.id, selectProcedure.ObjectType, CommandInfo.GetScalar, this.transaction,
                                                      selectProcedure.ProcedureName, selectProcedure.parameters));
 }
示例#14
0
 /// <summary>
 ///     Directly Execute a Command where Needed
 /// </summary>
 /// <param name="selectProcedure" type="string">
 ///     The SelectProcedure to execute
 /// </param>
 /// <returns>
 ///     An int value indicating rows affected
 /// </returns>
 public int ExecuteCommand(SelectProcedure selectProcedure)
 {
     return(this.context.Connection.TransactionCommand(this.id, selectProcedure.ObjectType, CommandInfo.Command, this.transaction,
                                                       selectProcedure.ProcedureName, selectProcedure.parameters));
 }
示例#15
0
 /// <summary>
 ///     Get a Raw DataSet where may be Needed
 /// </summary>
 /// <param name="dataSet">
 ///     The typed dataset to populate with the resultset
 /// </param>
 /// <param name="selectProcedure" type="Wilson.ORMapper.SelectProcedure">
 ///     A SelectProcdure instance used to define the stored procedure call
 /// </param>
 /// <returns>
 ///      A System.Data.DataSet object instance
 /// </returns>
 public DataSet GetDataSet(DataSet dataSet, SelectProcedure selectProcedure)
 {
     return(this.context.Connection.TransactionDataSet(this.id, selectProcedure.ObjectType, CommandInfo.DataSet, this.transaction, dataSet, selectProcedure.ProcedureName, selectProcedure.parameters));
 }
示例#16
0
 /// <summary>
 ///     Get a Raw DataSet where may be Needed
 /// </summary>
 /// <param name="selectProcedure" type="Wilson.ORMapper.SelectProcedure">
 ///     A SelectProcdure instance used to define the stored procedure call
 /// </param>
 /// <returns>
 ///      A System.Data.DataSet object instance
 /// </returns>
 public DataSet GetDataSet(SelectProcedure selectProcedure)
 {
     return(this.GetDataSet(null, selectProcedure));
 }
示例#17
0
 internal ObjectList(Internals.Context context, SelectProcedure selectSP)
 {
     this.context  = context;
     this.type     = typeof(T);
     this.selectSP = selectSP;
 }
示例#18
0
 /// <summary>
 ///     Directly Execute a Command where Needed
 /// </summary>
 /// <param name="selectProcedure" type="string">
 ///     The SelectProcedure to execute
 /// </param>
 /// <returns>
 ///     An int value indicating rows affected
 /// </returns>
 public int ExecuteCommand(SelectProcedure selectProcedure)
 {
     return this.context.Connection.TransactionCommand(this.id, selectProcedure.ObjectType, CommandInfo.Command, this.transaction,
         selectProcedure.ProcedureName, selectProcedure.parameters);
 }