Is its safe to create static level methods to handle database access?
DataAccessor.GetDataSet("spName",params);
Or should these be instance methods?
DataAccessor da = new DataAccessor();
da.GetDataSet("spName",params);
I created a class to remove some of the complexities of the data access layer (I think this would be the "Data Controller" layer:thread678-1121478). This class requires an instance to be used, but now I am experimenting with making the methods static. But I'm a little concerned with running into conflicts because a lot of applications are going to be using this class.
Is it good idea to create static methods for this type of work?
Thanks
If we're going to do it wrong we might as well do it wrong the right way.
DataAccessor.GetDataSet("spName",params);
Or should these be instance methods?
DataAccessor da = new DataAccessor();
da.GetDataSet("spName",params);
I created a class to remove some of the complexities of the data access layer (I think this would be the "Data Controller" layer:thread678-1121478). This class requires an instance to be used, but now I am experimenting with making the methods static. But I'm a little concerned with running into conflicts because a lot of applications are going to be using this class.
Is it good idea to create static methods for this type of work?
Thanks
If we're going to do it wrong we might as well do it wrong the right way.