Hello,
I'm using EnterpriseLibrary and DbCommand from it. I have two methods which from database gets same formated select. So the DataReader looks same but I'm executing other procedures.
Question is if good idea is move to one method executing DbCommand and data reading from DataReader like this:
public Dictionary<Guid,List<string>> GetCurrentLoginData()
{
// here is maked command and private method is called
}
public Dictionary<Guid,List<string>> GetSpecificLoginData(string login)
{
// here is maked command and private method is called
}
// method which is called from both public methods
private Dictionary<Guid,List<string>> GetLoginData(DbCommand command)
{
// here is code to executeCommand and data reading
}
or maybe somebody has other idea ? My other way is move only data reading to other method.
Thank's for answers I hope this will help me.