@@ -2298,7 +2298,7 @@ public async Task Can_add_concrete_base_resources_stored_as_derived_at_ToMany_re
2298
2298
2299
2299
await _testContext . RunOnDatabaseAsync ( async dbContext =>
2300
2300
{
2301
- dbContext . Set < VehicleManufacturer > ( ) . Add ( existingManufacturer ) ;
2301
+ dbContext . VehicleManufacturers . Add ( existingManufacturer ) ;
2302
2302
dbContext . Vehicles . Add ( existingTandem ) ;
2303
2303
await dbContext . SaveChangesAsync ( ) ;
2304
2304
} ) ;
@@ -2327,9 +2327,17 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
2327
2327
2328
2328
await _testContext . RunOnDatabaseAsync ( async dbContext =>
2329
2329
{
2330
- VehicleManufacturer manufacturerInDatabase = await dbContext . Set < VehicleManufacturer > ( ) . Include ( manufacturer => manufacturer . Vehicles )
2330
+ // @formatter:wrap_chained_method_calls chop_always
2331
+ // @formatter:keep_existing_linebreaks true
2332
+
2333
+ VehicleManufacturer manufacturerInDatabase = await dbContext . VehicleManufacturers
2334
+ . Include ( manufacturer => manufacturer . Vehicles
2335
+ . OrderByDescending ( vehicle => vehicle . Id ) )
2331
2336
. FirstWithIdAsync ( existingManufacturer . Id ) ;
2332
2337
2338
+ // @formatter:keep_existing_linebreaks restore
2339
+ // @formatter:wrap_chained_method_calls restore
2340
+
2333
2341
manufacturerInDatabase . Vehicles . ShouldHaveCount ( 2 ) ;
2334
2342
manufacturerInDatabase . Vehicles . ElementAt ( 0 ) . Should ( ) . BeOfType < Car > ( ) ;
2335
2343
manufacturerInDatabase . Vehicles . ElementAt ( 0 ) . Id . Should ( ) . Be ( existingManufacturer . Vehicles . ElementAt ( 0 ) . Id ) ;
@@ -2578,7 +2586,7 @@ public async Task Can_remove_concrete_base_resources_stored_as_derived_at_ToMany
2578
2586
2579
2587
await _testContext . RunOnDatabaseAsync ( async dbContext =>
2580
2588
{
2581
- dbContext . Set < VehicleManufacturer > ( ) . Add ( existingManufacturer ) ;
2589
+ dbContext . VehicleManufacturers . Add ( existingManufacturer ) ;
2582
2590
await dbContext . SaveChangesAsync ( ) ;
2583
2591
} ) ;
2584
2592
@@ -2606,7 +2614,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
2606
2614
2607
2615
await _testContext . RunOnDatabaseAsync ( async dbContext =>
2608
2616
{
2609
- VehicleManufacturer manufacturerInDatabase = await dbContext . Set < VehicleManufacturer > ( ) . Include ( manufacturer => manufacturer . Vehicles )
2617
+ VehicleManufacturer manufacturerInDatabase = await dbContext . VehicleManufacturers . Include ( manufacturer => manufacturer . Vehicles )
2610
2618
. FirstWithIdAsync ( existingManufacturer . Id ) ;
2611
2619
2612
2620
manufacturerInDatabase . Vehicles . ShouldHaveCount ( 1 ) ;
0 commit comments