When querying a collection using linq it always returns a null
Collection<JCTransLabour> oJCTransLabours = null;
oJCTransLabour = HttpContext.Current.Session["CurrentLabourTransactions"] as
Collection<JCTransLabour>;
// at this point the collection oJCTransLabours contains 3500 records
var oCurrentLabourTrans = from clt in oJCTransLabours
where clt.TransactionDate.Date != DateTime.Now.Date
select clt;
// at this point the collection oJCTransLabour = null
// I have tried to search on different fields
return oCurrentLabourTrans;
There must be something I am doing wrong. Any help would be very much appreciated.