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);
- }
标签:ObjectQuery,entities,Framework,sql,Entity,Entities,SQL,query,st 来源: https://www.cnblogs.com/canfengfeixue/p/15649378.html