ThenBy(xyz) should throw ArgumentException if xyz is not valid column reference #279

Closed
hmobius opened this Issue Apr 10, 2013 · 0 comments

Projects

None yet

1 participant

hmobius commented Apr 10, 2013

If I call ThenBy(xyz) where xyz is not a valid single columnReference, as below, a NullReferenceException is thrown.

db.Albums.All().OrderBy(db.Albums.AlbumId).ThenBy();
db.Albums.All().OrderBy(db.Albums.AlbumId).ThenBy(1);
db.Albums.All().OrderBy(db.Albums.AlbumId).ThenBy(db.Albums.GenreId == 1);
db.Albums.All().OrderBy(db.Albums.AlbumId).ThenBy(db.Albums.ArtistId, db.Albums.Title);

I would expect it to throw an ArgumentException instead.

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