//动态表名 ,动态条件 var list = db.Queryable<dynamic>().AS("order ").Where("id=@id", new { id = 1 }).ToList();//没实体一样用 //表名实体 ,动态条件 var list = db.Queryable<Order>().Where("id=@id", new { id = 1 }).ToList();//没实体一样用 //除了ToList还支持ToDateTable()
var list2 = db.Queryable<dynamic>("o").AS("order") .AddJoinInfo("OrderDetail", "i", "o.id=i.OrderId") .Where("id=@id", new { id = 1 }) .Select("o.*").ToList(); //除了ToList还支持ToDateTable()
var list = db.Queryable<Order>().Where("id=@id", new { id = 1 }).ToList();
2016 © donet5.comApache Licence 2.0