首页 > 代码库 > Entity Framework中查看生成的SQL语句

Entity Framework中查看生成的SQL语句

 

 

using (Entities entities = new Entities()){    var query = from st in entities.ShiTi                select st;    ObjectQuery oq = query as ObjectQuery;    string sql = oq.ToTraceString();    Console.WriteLine(sql);}

Entity Framework中查看生成的SQL语句