我有一个数据库映射EF 5.0.0实体框架,动态请求实体
我在一些列表中显示数据。我的数据是在“经典方法”检索:
using (myContext db = new myContext())
{
var products = db.products.Select(p => p).ToList();
}
我必须尽可能多的做,因为我的表有,
有没有什么办法让这个动态? :
using (myContext db = new myContext())
{
type currentType = myTable1Type
var currentList = db.currentType.Select(p => p).ToList();
}