Closed hmobius closed 11 years ago
If I call OrderBy(xyz) where xyz is anything other than a column reference, I'd expect an ArgumentException to be thrown. However a NullReferenceException is thrown instead when there is one. For instance
// Throws NullReferenceException db.Albums.All().OrderBy(1); db.Albums.All().OrderBy(db.Albums.GenreId == 1));
If I call OrderBy(xyz) where xyz is anything other than a column reference, I'd expect an ArgumentException to be thrown. However a NullReferenceException is thrown instead when there is one. For instance