数据库
首页 > 数据库> > Entity Framework中查看生成的SQL语句

Entity Framework中查看生成的SQL语句

作者:互联网

  1. using (Entities entities = new Entities())
  2. {
  3. var query = from st in entities.ShiTi
  4. select st;
  5. ObjectQuery oq = query as ObjectQuery;
  6. string sql = oq.ToTraceString();
  7. Console.WriteLine(sql);
  8. }

标签:ObjectQuery,entities,Framework,sql,Entity,Entities,SQL,query,st
来源: https://www.cnblogs.com/canfengfeixue/p/15649378.html