Calling Where with wrong number of arguments should throw ArgumentException #322

Open
hmobius opened this Issue Nov 11, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@hmobius

hmobius commented Nov 11, 2013

Where() takes one SimpleExpression argument. If I call Where() with zero or more than one argument, it throws a BadExpressionException. For example

var throwZero = db.Albums.All().Where();

var throwTooMany = db.Albums.All()
   .Where(db.Albums.GenreId == 1, db.Albums.ArtistId == 120);

In both cases, Simple.Data should throw an ArgumentException.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment