If we take a look at the Output window right after one of our web application's runs in debug mode, we should be able to see a bunch of SQL queries written in plain text. These are the queries used by the underlying LINQ to SQL provider, which is in charge of translating all our lambda expressions, query expressions, IQueryable objects, and expression trees into valid T-SQL queries.
Here's the output information line emitted by the Microsoft.EntityFrameworkCore middleware containing the SQL query used to retrieve the city of Moscow (the actual SQL query is highlighted):
Microsoft.EntityFrameworkCore.Database.Command: Information: Executing DbCommand [Parameters=[@__p_0='?' (DbType = Int32), @__p_1='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
SELECT [c].[Id], [c].[Name], [c].[Lat], [c].[Lon], [c0].[Id] AS [CountryId], [c0].[Name] AS [CountryName]
FROM [Cities] AS [c]
INNER JOIN [Countries] AS [c0] ON [c...