bug: optional parameters

1 view
Skip to first unread message

bryan costanich

unread,
Dec 18, 2008, 7:43:11 PM12/18/08
to DbLinq
hi all,

i found a bug when i run a query with optional parameters. this is the
test case that will call DbLinq.Puke():

[Test]
public void OptionalParameterTest()
{
var db = CreateDB();
string productName = null;

var dbItems =
(from a in db.Products
where (String.IsNullOrEmpty(productName) || a.ProductName ==
productName)
select a);

var list = dbItems.ToList();
}

the error is:

S0133: Implement QueryMethod 'IsNullOrEmpty'

in: \src\DbLinq\Data\Linq\Sugar\Implementation
\ExpressionDispatcher.Analyzer.cs Line: 267

after looking at the code, it looks like it's not parsing the
expression properly, and is instead expecting something else.

pascal isn't around much these days, so if anyone around wants to
tackle it, that would be awesome.

let me know,

-b
Reply all
Reply to author
Forward
0 new messages