@@ -2298,7 +2298,7 @@ public async Task Can_add_concrete_base_resources_stored_as_derived_at_ToMany_re
22982298
22992299 await _testContext . RunOnDatabaseAsync ( async dbContext =>
23002300 {
2301- dbContext . Set < VehicleManufacturer > ( ) . Add ( existingManufacturer ) ;
2301+ dbContext . VehicleManufacturers . Add ( existingManufacturer ) ;
23022302 dbContext . Vehicles . Add ( existingTandem ) ;
23032303 await dbContext . SaveChangesAsync ( ) ;
23042304 } ) ;
@@ -2327,9 +2327,17 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
23272327
23282328 await _testContext . RunOnDatabaseAsync ( async dbContext =>
23292329 {
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 ) )
23312336 . FirstWithIdAsync ( existingManufacturer . Id ) ;
23322337
2338+ // @formatter:keep_existing_linebreaks restore
2339+ // @formatter:wrap_chained_method_calls restore
2340+
23332341 manufacturerInDatabase . Vehicles . ShouldHaveCount ( 2 ) ;
23342342 manufacturerInDatabase . Vehicles . ElementAt ( 0 ) . Should ( ) . BeOfType < Car > ( ) ;
23352343 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
25782586
25792587 await _testContext . RunOnDatabaseAsync ( async dbContext =>
25802588 {
2581- dbContext . Set < VehicleManufacturer > ( ) . Add ( existingManufacturer ) ;
2589+ dbContext . VehicleManufacturers . Add ( existingManufacturer ) ;
25822590 await dbContext . SaveChangesAsync ( ) ;
25832591 } ) ;
25842592
@@ -2606,7 +2614,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext =>
26062614
26072615 await _testContext . RunOnDatabaseAsync ( async dbContext =>
26082616 {
2609- VehicleManufacturer manufacturerInDatabase = await dbContext . Set < VehicleManufacturer > ( ) . Include ( manufacturer => manufacturer . Vehicles )
2617+ VehicleManufacturer manufacturerInDatabase = await dbContext . VehicleManufacturers . Include ( manufacturer => manufacturer . Vehicles )
26102618 . FirstWithIdAsync ( existingManufacturer . Id ) ;
26112619
26122620 manufacturerInDatabase . Vehicles . ShouldHaveCount ( 1 ) ;
0 commit comments