0

I have couple of lines written like this:

 _DbContext.Business.Where(lb=>lb.id == (int)Constants.Business.Retail).Frist();
 
 //and 
 
_DbContext.Business.Where(lb=>lb.id == (int)Constants.Business.Retail).FristOrDefault();

How can I view SQL generated by this code during my debug (break point debug)? The code suggested very lengthy. Any sample code for quick reference during debugging? Thanks.

AskMe
  • 2,495
  • 8
  • 49
  • 102
  • In what version of EF Core? – Ricardo Peres Jul 14 '20 at 08:16
  • 1
    Does this answer your question? [How do you show underlying SQL query in EF Core 2.0?](https://stackoverflow.com/questions/45893732/how-do-you-show-underlying-sql-query-in-ef-core-2-0) or [Get SQL code from an Entity Framework Core IQueryable](https://stackoverflow.com/questions/37527783/get-sql-code-from-an-entity-framework-core-iqueryablet) – Preben Huybrechts Jul 14 '20 at 08:18
  • The code suggested very lengthy. Any sample code for quick reference during debugging? – AskMe Jul 14 '20 at 14:26
  • From EF properties; EF Run time version 4.0 and Version 6 with Visual Studio 2019 – AskMe Jul 14 '20 at 14:33

0 Answers0