How do I view the SQL generated by entity framework ?
(In my particular case I\'m using the mysql provider - if it matters)
I've just done this:
IQueryable query = EntitySet.Where(p => p.Id == id);
Debug.WriteLine(query);
And the result shown in the Output:
SELECT
[Extent1].[Id] AS [Id],
[Extent1].[Code] AS [Code],
[Extent1].[Name] AS [Name],
[Extent2].[Id] AS [Id1],
[Extent2].[FileName] AS [FileName],
FROM [dbo].[Products] AS [Extent1]
INNER JOIN [dbo].[PersistedFiles] AS [Extent2] ON [Extent1].[PersistedFileId] = [Extent2].[Id]
WHERE [Extent1].[Id] = @p__linq__0