from t1 in Table1
from t2 in Table2.Where(t => t.MyField == t1.MyField).DefaultIsEmpty()
select new
{
Id = t1.Id
}
EF Core translate this to
SELECT [t1].[Id]
FROM [Table1] AS [t1]
CROSS APPLY (
SELECT [t0].*
FROM (
SELECT NULL AS [empty]
) AS [empty0]
LEFT JOIN (
SELECT [t20].*
FROM [Table2AS [t20]
WHERE [t20].[MyField] = [t1].[MyField]
) AS [t0] ON 1 = 1
) AS [t3]
ORDER BY (SELECT 1)
OFFSET @__p_0 ROWS FETCH NEXT @__p_1 ROWS ONLY
while EF6 correctly translates:
SELECT [t0].[Id] AS [Id]
FROM [Table1] AS [t0], [Table2] AS [t1]
WHERE [t1].[MyField] = [t0].[Myfield]
Further technical details
EF Core version: 1.1.1
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 10
IDE: Visual Studio 2015 & LinqPad
My query is:
EF Core translate this to
while EF6 correctly translates:
Further technical details
EF Core version: 1.1.1 Database Provider: Microsoft.EntityFrameworkCore.SqlServer Operating system: Windows 10 IDE: Visual Studio 2015 & LinqPad