db.TableName.OrderByFieldName() works but shouldn't #269

Closed
hmobius opened this Issue Mar 28, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@hmobius

hmobius commented Mar 28, 2013

If I call OrderBy() directly on a table reference without a base command (All, FindAll etc), I'd expect a NullReferenceException to be thrown because there's no command to qualify. This works if I call any of the following

db.Albums.OrderBy();
db.Albums.OrderBy(db.Albums.ArtistId);
db.Albums.OrderBy(db["Albums"]["ArtistId"]);

But if I call

db.Albums.OrderByArtistId();

The albums table is returned ordered by artistId. I'd expect this last call not to run.

@markrendle

This comment has been minimized.

Show comment Hide comment
@markrendle

markrendle May 21, 2013

Owner

Too hard to fix.

Owner

markrendle commented May 21, 2013

Too hard to fix.

@markrendle markrendle closed this May 21, 2013

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