markrendle / Simple.Data

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

Length function throws ambiguous exception when you pass it an argument #290

Closed hmobius closed 11 years ago

hmobius commented 11 years ago

The Length function does not take any arguments. But when you pass it one - for example

var albums = Database.Open().Albums.Select(db.Albums.Title.Length(123));

you get the following exception.

Query returned a Simple.Data.SimpleQuery
Simple.Data.Ado.AdoAdapterException
The len function requires 1 argument(s).

The message is wrong for two reasons : its the Length function and it requires 0 arguments. It should also be throwing an ArgumentException.

markrendle commented 11 years ago

Unfortunately that's just wrapping a SqlException and I'm limited as to what I can do.