markrendle / Simple.Data

A light-weight, dynamic data access component for C# 4.0
MIT License
1.33k stars 303 forks source link

ThenBy ignores column named parameter in favour of fluid style name. #280

Closed hmobius closed 11 years ago

hmobius commented 11 years ago

If I call ThenByColumnName(xyz) where xyz is anything, xyz is ignored and the query sorted.

db.Albums.All().OrderBy(db.Albums.AlbumId).ThenByGenreId(1);
db.Albums.All().OrderBy(db.Albums.AlbumId).ThenByGenreId(db.Albums.Title)

In the two calls above, results are sorted on AlbumId and GenreId. I would expect an ArgumentException to be thrown instead.

markrendle commented 11 years ago

Fixed