Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18792/src/Adapdev.Data
Modified Files:
AbstractDAO.cs
Log Message:
Cleaned up several warnings
Restored some lingering files
Index: AbstractDAO.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/AbstractDAO.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** AbstractDAO.cs 16 Nov 2005 07:01:47 -0000 1.7
--- AbstractDAO.cs 26 Nov 2005 08:09:22 -0000 1.8
***************
*** 326,330 ****
public object SelectById(object id)
{
! return this.SelectOne(id);
}
--- 326,336 ----
public object SelectById(object id)
{
! object o;
! using (IDbConnection conn = this.CreateConnection())
! {
! conn.Open();
! o = this.SelectById(id, conn);
! }
! return o;
}
***************
*** 337,342 ****
public object SelectById(object id, IDbConnection connection)
{
! return this.SelectOne(id, connection);
! }
/// <summary>
--- 343,356 ----
public object SelectById(object id, IDbConnection connection)
{
! object o = null;
! IDataReader dr = DbProviderFactory.CreateDataReader(connection, this.CreateSelectOneCommand(id), this.provider);
! while (dr.Read())
! {
! o = this.MapObject(dr);
! break;
! }
! dr.Close();
!
! return o; }
/// <summary>
***************
*** 349,359 ****
public object SelectOne(object id)
{
! object o;
! using (IDbConnection conn = this.CreateConnection())
! {
! conn.Open();
! o = this.SelectOne(id, conn);
! }
! return o;
}
--- 363,367 ----
public object SelectOne(object id)
{
! return this.SelectById(id);
}
***************
*** 367,380 ****
public object SelectOne(object id, IDbConnection conn)
{
! object o = null;
! IDataReader dr = DbProviderFactory.CreateDataReader(conn, this.CreateSelectOneCommand(id), this.provider);
! while (dr.Read())
! {
! o = this.MapObject(dr);
! break;
! }
! dr.Close();
!
! return o;
}
--- 375,379 ----
public object SelectOne(object id, IDbConnection conn)
{
! return this.SelectById(id, conn);
}
***************
*** 592,596 ****
public DataSet SelectDatasetById(object id)
{
! return this.SelectOneDS(id);
}
--- 591,595 ----
public DataSet SelectDatasetById(object id)
{
! return this.CreateDataSet(this.CreateSelectOneCommand(id));
}
***************
*** 603,607 ****
public DataSet SelectDatasetById(object id, IDbConnection conn)
{
! return this.SelectOneDS(id, conn);
}
--- 602,606 ----
public DataSet SelectDatasetById(object id, IDbConnection conn)
{
! return this.GetDataSet(this.CreateSelectOneCommand(id), conn);
}
***************
*** 615,619 ****
public DataSet SelectOneDS(object id)
{
! return this.CreateDataSet(this.CreateSelectOneCommand(id));
}
--- 614,618 ----
public DataSet SelectOneDS(object id)
{
! return this.SelectDatasetById(id);
}
***************
*** 627,631 ****
public DataSet SelectOneDS(object id, IDbConnection conn)
{
! return this.GetDataSet(this.CreateSelectOneCommand(id), conn);
}
--- 626,630 ----
public DataSet SelectOneDS(object id, IDbConnection conn)
{
! return this.SelectDatasetById(id, conn);
}
|