@@ -316,82 +316,79 @@ public void ProjectKnownTypeWithCollection2()
316
316
Assert . That ( result [ 0 ] . ExpandedElement . OrderLines , Is . EquivalentTo ( result [ 0 ] . ProjectedProperty0 ) ) ;
317
317
}
318
318
319
- [ Test ]
320
- public void ProjectNestedKnownTypeWithCollection ( )
321
- {
322
-
323
- var query = from o in db . Products
324
- select new ExpandedWrapper < Product , ExpandedWrapper < Supplier , IEnumerable < Product > > >
325
- {
326
- ExpandedElement = o ,
327
- ProjectedProperty0 = new ExpandedWrapper < Supplier , IEnumerable < Product > > ( )
328
- {
329
- ExpandedElement = o . Supplier ,
330
- ProjectedProperty0 = o . Supplier . Products ,
331
- Description = "Products" ,
332
- ReferenceDescription = ""
333
- } ,
334
- Description = "Supplier" ,
335
- ReferenceDescription = "Supplier"
336
- } ;
337
-
338
- var result = query . ToList ( ) ;
339
- Assert . That ( result . Count , Is . EqualTo ( 77 ) ) ;
340
- Assert . That ( result [ 0 ] . ExpandedElement . Supplier , Is . EqualTo ( result [ 0 ] . ProjectedProperty0 . ExpandedElement ) ) ;
341
- Assert . That ( result [ 0 ] . ExpandedElement . Supplier . Products , Is . EquivalentTo ( result [ 0 ] . ProjectedProperty0 . ProjectedProperty0 ) ) ;
342
-
343
- }
344
-
345
- [ Test ]
346
- public void ProjectNestedAnonymousTypeWithCollection ( )
347
- {
348
-
349
- var query = from o in db . Products
350
- select new
351
- {
352
- ExpandedElement = o ,
353
- ProjectedProperty0 = new
354
- {
355
- ExpandedElement = o . Supplier ,
356
- ProjectedProperty0 = o . Supplier . Products ,
357
- Description = "Products" ,
358
- ReferenceDescription = ""
359
- } ,
360
- Description = "Supplier" ,
361
- ReferenceDescription = "Supplier"
362
- } ;
363
-
364
- var result = query . ToList ( ) ;
365
- Assert . That ( result . Count , Is . EqualTo ( 77 ) ) ;
366
- Assert . That ( result [ 0 ] . ExpandedElement . Supplier , Is . EqualTo ( result [ 0 ] . ProjectedProperty0 . ExpandedElement ) ) ;
367
- Assert . That ( result [ 0 ] . ExpandedElement . Supplier . Products , Is . EquivalentTo ( result [ 0 ] . ProjectedProperty0 . ProjectedProperty0 ) ) ;
368
-
369
- }
370
-
371
- [ Test ]
372
- public void ProjectNestedAnonymousTypeWithProjectedCollection ( )
373
- {
374
-
375
- var query = from o in db . Products
376
- select new
377
- {
378
- ExpandedElement = o ,
379
- ProjectedProperty0 = new
380
- {
381
- ExpandedElement = o . Supplier ,
382
- ProjectedProperty0 = o . Supplier . Products . Select ( x=> new { x . Name } ) ,
383
- Description = "Products" ,
384
- ReferenceDescription = ""
385
- } ,
386
- Description = "Supplier" ,
387
- ReferenceDescription = "Supplier"
388
- } ;
389
-
390
- var result = query . ToList ( ) ;
391
- Assert . That ( result . Count , Is . EqualTo ( 77 ) ) ;
392
- Assert . That ( result . Single ( x => x . ExpandedElement . ProductId == 1 ) . ProjectedProperty0 . ProjectedProperty0 . Count ( ) , Is . EqualTo ( 3 ) ) ;
393
-
394
- }
319
+ [ Test ]
320
+ public void ProjectNestedKnownTypeWithCollection ( )
321
+ {
322
+ var query = from o in db . Products
323
+ select new ExpandedWrapper < Product , ExpandedWrapper < Supplier , IEnumerable < Product > > >
324
+ {
325
+ ExpandedElement = o ,
326
+ ProjectedProperty0 = new ExpandedWrapper < Supplier , IEnumerable < Product > >
327
+ {
328
+ ExpandedElement = o . Supplier ,
329
+ ProjectedProperty0 = o . Supplier . Products ,
330
+ Description = "Products" ,
331
+ ReferenceDescription = ""
332
+ } ,
333
+ Description = "Supplier" ,
334
+ ReferenceDescription = "Supplier"
335
+ } ;
336
+
337
+ var result = query . ToList ( ) ;
338
+ Assert . That ( result , Has . Count . EqualTo ( 77 ) ) ;
339
+ Assert . That ( result [ 0 ] . ExpandedElement . Supplier , Is . EqualTo ( result [ 0 ] . ProjectedProperty0 . ExpandedElement ) ) ;
340
+ Assert . That ( result [ 0 ] . ExpandedElement . Supplier . Products ,
341
+ Is . EquivalentTo ( result [ 0 ] . ProjectedProperty0 . ProjectedProperty0 ) ) ;
342
+ }
343
+
344
+ [ Test ]
345
+ public void ProjectNestedAnonymousTypeWithCollection ( )
346
+ {
347
+ var query = from o in db . Products
348
+ select new
349
+ {
350
+ ExpandedElement = o ,
351
+ ProjectedProperty0 = new
352
+ {
353
+ ExpandedElement = o . Supplier ,
354
+ ProjectedProperty0 = o . Supplier . Products ,
355
+ Description = "Products" ,
356
+ ReferenceDescription = ""
357
+ } ,
358
+ Description = "Supplier" ,
359
+ ReferenceDescription = "Supplier"
360
+ } ;
361
+
362
+ var result = query . ToList ( ) ;
363
+ Assert . That ( result , Has . Count . EqualTo ( 77 ) ) ;
364
+ Assert . That ( result [ 0 ] . ExpandedElement . Supplier , Is . EqualTo ( result [ 0 ] . ProjectedProperty0 . ExpandedElement ) ) ;
365
+ Assert . That ( result [ 0 ] . ExpandedElement . Supplier . Products ,
366
+ Is . EquivalentTo ( result [ 0 ] . ProjectedProperty0 . ProjectedProperty0 ) ) ;
367
+ }
368
+
369
+ [ Test ]
370
+ public void ProjectNestedAnonymousTypeWithProjectedCollection ( )
371
+ {
372
+ var query = from o in db . Products
373
+ select new
374
+ {
375
+ ExpandedElement = o ,
376
+ ProjectedProperty0 = new
377
+ {
378
+ ExpandedElement = o . Supplier ,
379
+ ProjectedProperty0 = o . Supplier . Products . Select ( x => new { x . Name } ) ,
380
+ Description = "Products" ,
381
+ ReferenceDescription = ""
382
+ } ,
383
+ Description = "Supplier" ,
384
+ ReferenceDescription = "Supplier"
385
+ } ;
386
+
387
+ var result = query . ToList ( ) ;
388
+ Assert . That ( result , Has . Count . EqualTo ( 77 ) ) ;
389
+ Assert . That ( result . Single ( x => x . ExpandedElement . ProductId == 1 ) . ProjectedProperty0 . ProjectedProperty0 . Count ( ) ,
390
+ Is . EqualTo ( 3 ) ) ;
391
+ }
395
392
396
393
[ Test ]
397
394
public void CanProjectComplexDictionaryIndexer ( )
0 commit comments