markrendle / Simple.Data

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

Calling ExistsBy on itself throws a RuntimeBinderException #318

Open hmobius opened 10 years ago

hmobius commented 10 years ago

It is a stupid thing to do, but if you call ExistsBy() on itself or twice in a chained command, Simple.Data throws a RuntimeBinderException.

var albumsExist = db.Albums.ExistsByGenreId(null).ExistsByGenreId(null);

In the interests of quashing RBEs, suggest this throws an InvalidOperationException instead.