Dynamic query using LINQ to SQL

前端 未结 5 1349
我在风中等你
我在风中等你 2021-01-12 02:21

I need to figure out if it is possible to dynamically build a query with LINQ, dynamically selecting the table in which to perform the query.

This is an example of w

5条回答
  •  长发绾君心
    2021-01-12 03:02

    
    var esql = "select t from TypeName as t"
    var q = db.CreateQuery(esql);
    
    

    Use entity sql for linq to sql, http://esql.codeplex.com

提交回复
热议问题