Skip to content

NH-3534 #322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 21, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/NHibernate.Test/Linq/LinqQuerySamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ namespace NHibernate.Test.Linq
[TestFixture]
public class LinqQuerySamples : LinqTestCase
{
[Test]
public void GroupTwoQueriesAndSum()
{
//NH-3534
var queryWithAggregation = from o1 in db.Orders
from o2 in db.Orders
where o1.Customer.CustomerId == o2.Customer.CustomerId && o1.OrderDate == o2.OrderDate
group o1 by new { o1.Customer.CustomerId, o1.OrderDate } into g
select new { CustomerId = g.Key.CustomerId, LastOrderDate = g.Max(x => x.OrderDate) };

var result = queryWithAggregation.ToList();

Assert.IsNotNull(result);
Assert.IsNotEmpty(result);
}

[Category("WHERE")]
[Test(Description = "This sample uses WHERE to filter for Customers in London.")]
public void DLinq1()
Expand Down