markrendle / Simple.Data

A light-weight, dynamic data access component for C# 4.0
MIT License
1.33k stars 303 forks source link

Passing two valid parameters to Having should not throw an InvalidOperationException #288

Closed hmobius closed 11 years ago

hmobius commented 11 years ago

If I add a call to Having and pass it two valid SimpleExpressions as parameters (see below), Simple.Data throws an InvalidOperationException.

db.Albums.All()
   .Select(db.Albums.Artists.Name, 
           db.Albums.AlbumId.Count().As("NumberOfAlbums"),   
           db.Albums.Price.Sum().As("TotalCost"))
   .Having(db.Albums.AlbumId.Count() > 2, db.Albums.Price.Sum() >= 16.99);

It should throw an ArgumentException instead.