File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,22 @@ namespace NHibernate.Test.Linq
9
9
[ TestFixture ]
10
10
public class LinqQuerySamples : LinqTestCase
11
11
{
12
+ [ Test ]
13
+ public void GroupTwoQueriesAndSum ( )
14
+ {
15
+ //NH-3534
16
+ var queryWithAggregation = from o1 in db . Orders
17
+ from o2 in db . Orders
18
+ where o1 . Customer . CustomerId == o2 . Customer . CustomerId && o1 . OrderDate == o2 . OrderDate
19
+ group o1 by new { o1 . Customer . CustomerId , o1 . OrderDate } into g
20
+ select new { CustomerId = g . Key . CustomerId , LastOrderDate = g . Max ( x => x . OrderDate ) } ;
21
+
22
+ var result = queryWithAggregation . ToList ( ) ;
23
+
24
+ Assert . IsNotNull ( result ) ;
25
+ Assert . IsNotEmpty ( result ) ;
26
+ }
27
+
12
28
[ Category ( "WHERE" ) ]
13
29
[ Test ( Description = "This sample uses WHERE to filter for Customers in London." ) ]
14
30
public void DLinq1 ( )
You can’t perform that action at this time.
0 commit comments