Small bug with NULL value

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
Posts: 28
Joined: Wed 12 Nov 2008 01:31

Small bug with NULL value

Post by dqminh » Fri 12 Dec 2008 03:19


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

Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by 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.

Post Reply