Here is what I need to do;
string className = "Customer";
List<className> myList = new List<className>();
className can be any of my Entity Framework classes. I have used Customer just as an example.
I hope this is possible. If so, how?
UPDATE:
I also need to use this approach for retrieving data from an Entity Framework dbContext. For example...
string className = "Customer";
var myData = db.Set<className>();
Sorry. Not sure if I should have created another question here or updated this one. Be gentle with me. I'm new here. :o)
List<object>because that's what you're going to have to treat that list as in the rest of the code anyway.objector some other base class? Generics gets you the closest to a solution for the problem (try to use a covariant parameter, but then you can't useList<>)