Calling First() or FirstOrDefault() as a Select function should throw InvalidOperationException #291

Closed
hmobius opened this Issue May 8, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@hmobius

hmobius commented May 8, 2013

If you call

var db = Database.Open().Albums.First();

or

var db = Database.Open().Albums.FirstOrDefault();

you'll get a RuntimeBinderException thrown back. Suggest that it should throw an InvalidOperationException instead.

@hmobius

This comment has been minimized.

Show comment
Hide comment
@hmobius

hmobius May 8, 2013

Applies also to Single() and SingleOrDefault()

hmobius commented May 8, 2013

Applies also to Single() and SingleOrDefault()

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