P
PokerMan
Hi
Ok in my app i have some classes that will only ever have one instance. All
of which i make Singletons.
I also have another class that acts like an easy access wrapper for any db
access. Again this is a one time instance.
If it wasn't a one only instance is there a danger in db access? Such as two
threads calling the same method and updating something incorrectly?
Should i make that class a singleton, or make all the methods in that class
static? Since a singleton returns a static instance, does that not do the
same as setting all methods to static?
To be clear an example of one method is like this:
public DataSet GetCustomer()
{
return runProcedure("sp_Customers");
}
Thanks in advance
Ok in my app i have some classes that will only ever have one instance. All
of which i make Singletons.
I also have another class that acts like an easy access wrapper for any db
access. Again this is a one time instance.
If it wasn't a one only instance is there a danger in db access? Such as two
threads calling the same method and updating something incorrectly?
Should i make that class a singleton, or make all the methods in that class
static? Since a singleton returns a static instance, does that not do the
same as setting all methods to static?
To be clear an example of one method is like this:
public DataSet GetCustomer()
{
return runProcedure("sp_Customers");
}
Thanks in advance