I have a Entity model that includes a large number of lookup entities. All have just ID and Name properties.
I do not want to build large number of DAL classes to simply have something like:
IList<Lookup1> lookup1List= ctx.Lookup1.ToList();
and another class (Or method) with
IList<Lookup2> lookup2List= ctx.Lookup2.ToList();
and another with
IList<Lookup3> lookup3List= ctx.Lookup3.ToList();
I want to have one generic way to query all them using an interface they all Implement. Something like
IList<ILookupEntity> list = "SomeMethod"(Type lookupType);
How can I do that?