Esempio n. 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);
		}
Esempio n. 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));
		}
Esempio n. 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);
 }
Esempio n. 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));
 }
Esempio n. 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();
		}
Esempio n. 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();
            }
        }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 10
0
 internal ObjectList(Internals.Context context, SelectProcedure selectSP)
 {
     this.context = context;
     this.type = selectSP.ObjectType;
     this.selectSP = selectSP;
 }
Esempio n. 11
0
 internal ObjectReader(Internals.Context context, SelectProcedure <T> selectProcedure, bool firstLevel)
     : base(context, selectProcedure, firstLevel)
 {
 }
Esempio n. 12
0
 internal ObjectHolder(Internals.Context context, SelectProcedure <T> selectSP)
     : base(context, selectSP)
 {
 }
Esempio n. 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));
 }
Esempio n. 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));
 }
Esempio n. 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));
 }
Esempio n. 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));
 }
Esempio n. 17
0
 internal ObjectList(Internals.Context context, SelectProcedure selectSP)
 {
     this.context  = context;
     this.type     = typeof(T);
     this.selectSP = selectSP;
 }
Esempio n. 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);
 }