关于[Implementing Missing Features in Entity Framework Core – Part 5: Getting the SQL for a Query]的摘要:
This will be the fifth post in a series of posts about bringing the features that were present in Entity Framework pre-Core into EF Core. The others are: Part 1: Introduction, Find, Getting an Entity’s Id Programmatically, Reload, Local, Evict Part 2: Explicit Loading Part 3: Validations Part 4: Conventions This time I’m going to talk about something that is often requested: how can I get the SQL string for a LINQ query? If you remember, in the pre-Core days you had to do some reflection in order to get the underlying ObjectQuery and then call its ToTraceString method. Now, things are very different, although I may say, still rather tricky!