Z
Zeno Lee
Right now I'm putting my query strings into static functions in a DbQuery
class that returns Datatables.
Eg.
public class DbQuery
{
public static Datatable GetMyData()
{
Dataset ds;
...
string query = "select * from SomeTable";
....
return ds.Tables[0];
}
}
Over time, I'm accumulating a lot of static methods in my DbQuery class.
This way seems very procedural. I'm trying to make it more object oriented.
Any recommendations on how to encapsulate individual queries into a more
object oriented framework?
class that returns Datatables.
Eg.
public class DbQuery
{
public static Datatable GetMyData()
{
Dataset ds;
...
string query = "select * from SomeTable";
....
return ds.Tables[0];
}
}
Over time, I'm accumulating a lot of static methods in my DbQuery class.
This way seems very procedural. I'm trying to make it more object oriented.
Any recommendations on how to encapsulate individual queries into a more
object oriented framework?