I am not sure if this is possible. Maybe I'm trying to use the wrong tool for the work I'm trying to do.
Suppose I want to do the following:
I execute a function called "GetTableName" which returns the name of the SQL table from which I want to get the data.
I perform another function called GetFields, which returns the names of one or more fields in an SQL table.
I would like to be able to write another function that will return a DataSet (or some other common object) containing the rows from the table specified in "GetTableName", with the fields specified by "GetFields"
I know I can do this with the old ADO.net interface, but is there any way to do this using the Entity Framework?
To emphasize, the code will not know at compile time what the form of the data returned from SQL will be.
source share