コード例 #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
ファイル: Transaction.cs プロジェクト: Marceli/Roberta
 /// <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
ファイル: Transaction.cs プロジェクト: Marceli/Roberta
 /// <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
ファイル: Transaction.cs プロジェクト: Marceli/Roberta
 /// <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
ファイル: ObjectList.cs プロジェクト: Marceli/Roberta
 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
ファイル: Transaction.cs プロジェクト: Marceli/Roberta
 /// <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);
 }