Scenario
You have an Assembly for Data Transfer Objects containing 10 classes that exactly represent 10 tables in your database. You generate / build a DAL layer that has methods like -
DTOForTable1[] GetDataFromTable1();
DTOForTable2[] GetDataFromTable2();
and so on....
Question
How do I make a method that hides the numerous methods to get data from each table from the client code? The method I would want for example in service or business layer could look like-
SomeGenericDTO[] GetDataFromTable(TableTypeEnum tableTypeEnum);
How do I do this ? Is this even possible ?
If yes for (1), is it a good practice ?
If yes for (1) and (2) does this simplifies or complicate design ?
Thanks in advance.