This is only going to be possible if there is some common function that you can put on all your potential BL classes, but you solve this with interface
public interface IDetailsRepository
{
DataSet GetData();
}
public class OrgDetails : IDetailsRepository
{
public DataSet GetData()
{
return new DataSet();
}
}
public class XyzDetails : IDetailsRepository
{
public DataSet GetData()
{
return new DataSet();
}
}
Function;
public DataSet FetchEmailDetails(IDetailsRepository bl)
{
DataSet ds = bl.GetData();
return ds;
}
Usage;
FetchEmailDetails(new OrgDetails());
FetchEmailDetails(new XyzDetails());