Extract sql query from LINQ expressions

后端 未结 5 1568
太阳男子
太阳男子 2020-12-15 22:06

Is it possible to extract sql statements from LINQ queries ?

Say, I have this LINQ expression.

        string[] names =
            ne         


        
5条回答
  •  盖世英雄少女心
    2020-12-15 22:20

    A easier method I found was to use the Command Window and you did not need to input any additional code. Here you can print a linq statement called query to the query window:

    ? ((System.Data.Objects.ObjectQuery) query).ToTraceString()

提交回复
热议问题