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