Skip to content

Commit e8248f5

Browse files
committed
BREAKING: removed LeftJoin because EF supports it natively
1 parent 8daa936 commit e8248f5

File tree

8 files changed

+4
-495
lines changed

8 files changed

+4
-495
lines changed

samples/Thinktecture.EntityFrameworkCore.SqlServer.Samples/Program.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ public static async Task Main(string[] args)
5656
await DoComplexCollectionParameterAsync(ctx, customerId);
5757
ctx.ChangeTracker.Clear();
5858

59-
// LEFT JOIN
60-
await DoLeftJoinAsync(ctx);
61-
ctx.ChangeTracker.Clear();
62-
6359
// ROWNUMBER
6460
await DoRowNumberAsync(ctx);
6561
ctx.ChangeTracker.Clear();
@@ -183,18 +179,6 @@ private static async Task DoRowNumberAsync(DemoDbContext ctx)
183179
Console.WriteLine($"Latest orders: {String.Join(", ", latestOrders.Select(o => $"{{ CustomerId={o.CustomerId}, OrderId={o.Id} }}"))}");
184180
}
185181

186-
private static async Task DoLeftJoinAsync(DemoDbContext ctx)
187-
{
188-
var customerOrder = await ctx.Customers
189-
.LeftJoin(ctx.Orders,
190-
c => c.Id,
191-
o => o.CustomerId,
192-
result => new { Customer = result.Left, Order = result.Right })
193-
.ToListAsync();
194-
195-
Console.WriteLine($"Found customers: {String.Join(", ", customerOrder.Select(co => $"{{ CustomerId={co.Customer.Id}, OrderId={co.Order?.Id} }}"))}");
196-
}
197-
198182
private static async Task DoBulkInsertAsync(DemoDbContext ctx)
199183
{
200184
var id = Guid.NewGuid();

samples/Thinktecture.EntityFrameworkCore.Sqlite.Samples/Program.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ public static async Task Main(string[] args)
4646
await DoBulkInsertOrUpdateAsync(ctx, customerId);
4747
ctx.ChangeTracker.Clear();
4848

49-
// LEFT JOIN
50-
await DoLeftJoinAsync(ctx);
51-
ctx.ChangeTracker.Clear();
52-
5349
// ROWNUMBER
5450
await DoRowNumberAsync(ctx);
5551
ctx.ChangeTracker.Clear();
@@ -95,18 +91,6 @@ private static async Task DoRowNumberAsync(DemoDbContext ctx)
9591
Console.WriteLine($"Latest orders: {String.Join(", ", latestOrders.Select(o => $"{{ CustomerId={o.CustomerId}, OrderId={o.Id} }}"))}");
9692
}
9793

98-
private static async Task DoLeftJoinAsync(DemoDbContext ctx)
99-
{
100-
var customerOrder = await ctx.Customers
101-
.LeftJoin(ctx.Orders,
102-
c => c.Id,
103-
o => o.CustomerId,
104-
result => new { Customer = result.Left, Order = result.Right })
105-
.ToListAsync();
106-
107-
Console.WriteLine($"Found customers: {String.Join(", ", customerOrder.Select(co => $"{{ CustomerId={co.Customer.Id}, OrderId={co.Order?.Id} }}"))}");
108-
}
109-
11094
private static async Task BulkInsertIntoTempTableAsync(DemoDbContext ctx)
11195
{
11296
var customersToInsert = new Customer(Guid.NewGuid(), "First name", "Last name");

src/Thinktecture.EntityFrameworkCore.Relational/EntityFrameworkCore/LeftJoinResult.cs

Lines changed: 0 additions & 124 deletions
This file was deleted.

0 commit comments

Comments
 (0)