Small bug with NULL value

Small bug with NULL value

Postby dqminh » Fri 12 Dec 2008 03:19

Hi,

The query with NULL value has small bug: when compare with NULL, we must pass null keyword, not a parameter which has null value. See example:

Code: Select all
PartDataContext db = new PartDataContext();
string parent = null;

// it not works
var r1 = db.Dealers.Where(p => p.ParentCode == parent); // 0 result

// it works
var r2 = db.Dealers.Where(p => p.ParentCode == null); // has result
dqminh
 
Posts: 28
Joined: Wed 12 Nov 2008 01:31

Postby AndreyR » Fri 12 Dec 2008 12:15

The first case is not supported yet.
We will investigate the possibility of implementing this, but no timeframe can be determined now.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to LinqConnect (LINQ to SQL support)