igor-tkachev/bltoolkit — pull request #173 by jack128 (2013-03-04 07:37:15+00:00)
Title: BLToolkit select unnecessary field.

see here http://www.rsdn.ru/forum/prj.rfd/5027715.1

var q =
from person in db.Person
join patient in db.Patient on person.ID equals patient.PersonID into g
from patient in g.DefaultIfEmpty()
orderby person.MiddleName // if comment this line then "Diagnosis" is not selected.
select new { person.ID, PatientID = patient != null ? (int?)patient.PersonID : null };
// ReSharper disable ReturnValueOfPureMethodIsNotUsed
q.ToList();
// ReSharper restore ReturnValueOfPureMethodIsNotUsed

Assert.IsFalse(db.LastQuery.Contains("Diagnosis"), "Why do we select Patient.Diagnosis??");