How do I view the SQL generated by the Entity Framework?

后端 未结 22 2889
别那么骄傲
别那么骄傲 2020-11-21 05:35

How do I view the SQL generated by entity framework ?

(In my particular case I\'m using the mysql provider - if it matters)

22条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-21 06:15

    Starting with EF6.1 you can use Interceptors to register a database logger. See chapters "Interceptors" and "Logging Database Operations" to a File here

     
       
         
           
           
         
       
    
    

提交回复
热议问题