Linq PredicateBuilder not returning results
I'm still ramping up on Linq, but hopefully someone can help me determine why I'm not getting any results from the following method that uses PredicateBuilder (gOrderCount always == 0), any help greatly appreciated:

    public IQueryable<TrackingInfo> GetTrackingAllOrders(string custName, string supplier, string assigned)
        {
            var predicate = PredicateBuilder.False<TrackingInfo>();

            if (custName != null && custName != String.Empty)
            {
                predicate = predicate.And(c => c.CustomerName.Contains(custName));
            }
            if (supplier != null && supplier != String.Empty)
            {
                predicate = predicate.And(c => c.Supplier.Contains(supplier));
            }
            if (assigned != null && assigned != String.Empty)
            {
                predicate = predicate.And(c => c.AssignedTo.Contains(assigned));
            }

             IQueryable<TrackingInfo> oList = null;

            using (var ctx = new OMS_ISSEntities())
            {
                oList = (from c in ctx.GetSSISTrackingInfoFuction()
                         orderby c.OrderID descending
                         select new TrackingInfo
                         {
                             OrderID = c.OrderID,
                             CustomerName = c.CustomerName ?? String.Empty,
                             ClientServiceID = c.ClientServiceID ?? String.Empty,
                             SiteName = c.SiteName ?? String.Empty,
                             SiteStatus = c.SiteStatus ?? String.Empty,
                             IPNETWCount = c.IPNETWCount ?? 0,
                             VOIPCount = c.VOIPCount ?? 0,
                             AirCardCount = c.AirCardCount ?? 0,
                             TicketProductType = c.TicketProductType ?? String.Empty,
                             SiteAddress = c.SiteAddress ?? String.Empty,
                             LCONPhone = c.LCONPhone ?? String.Empty,
                             Supplier = c.Supplier ?? String.Empty,
                             SupplierOrderNumber = c.SupplierOrderNumber ?? String.Empty,
                             ConfFOCDate = c.ConfFOCDate,
                             DSLNumber = c.DSLNumber ?? String.Empty,
                             DSLLineType = c.DSLLineType ?? String.Empty,
                             JournalNote = c.JournalNote ?? String.Empty,
                             JournalLastUpdate = c.JournalLastUpdate,
                             Project = c.Project ?? String.Empty,
                             SiteICB = c.SiteICB,
                             SiteISSDueDate = c.SiteISSDueDate,
                             SiteISSInfo = c.SiteISSInfo ?? String.Empty,
                             AssignedTo = c.AssignedTo ?? String.Empty,
                             SiteSubmitDate = c.SiteSubmitDate,
                             SiteID = c.SiteID ?? String.Empty,
                             UserLogin = c.UserLogin ?? String.Empty,
                             ClientSiteType = c.ClientSiteType ?? String.Empty,
                             OpenJeop_Supp = c.OpenJeop_Supp,
                             PastDueFOC = c.PastDueFOC,
                             DaysSinceLastJNUpdate = c.DaysSinceLastJNUpdate,
                             SiteStatusID = c.SiteStatusID,
                             AssignedToID = c.AssignedToID,
                             SupplierID = c.SupplierID,
                             MasterCustID = c.MasterCustID,
                             MaxJeopSuppDate = c.MaxJeopSuppDate,
                             EstimatedTTU = c.Sit_EstTTU
                         }).ToList().AsQueryable().Where(predicate);

                gOrderCount = oList.Count();
                

                if (gOrderCount > 1500)  //we limit max number of records returned to 1500
                {
                    return null;
                }

                return oList.AsQueryable();
            }
        }
 
Linq PredicateBuilder not returning results
===

I'm still ramping up on Linq, but hopefully someone can help me determine why I'm not getting any results from the following method that uses PredicateBuilder (gOrderCount always == 0), any help greatly appreciated:

    public IQueryable<TrackingInfo> GetTrackingAllOrders(string custName, string supplier, string assigned)
        {
            var predicate = PredicateBuilder.False<TrackingInfo>();

            if (custName != null && custName != String.Empty)
            {
                predicate = predicate.And(c => c.CustomerName.Contains(custName));
            }
            if (supplier != null && supplier != String.Empty)
            {
                predicate = predicate.And(c => c.Supplier.Contains(supplier));
            }
            if (assigned != null && assigned != String.Empty)
            {
                predicate = predicate.And(c => c.AssignedTo.Contains(assigned));
            }

             IQueryable<TrackingInfo> oList = null;

            using (var ctx = new OMS_ISSEntities())
            {
                oList = (from c in ctx.GetSSISTrackingInfoFuction()
                         orderby c.OrderID descending
                         select new TrackingInfo
                         {
                             OrderID = c.OrderID,
                             CustomerName = c.CustomerName ?? String.Empty,
                             ClientServiceID = c.ClientServiceID ?? String.Empty,
                             SiteName = c.SiteName ?? String.Empty,
                             SiteStatus = c.SiteStatus ?? String.Empty,
                             IPNETWCount = c.IPNETWCount ?? 0,
                             VOIPCount = c.VOIPCount ?? 0,
                             AirCardCount = c.AirCardCount ?? 0,
                             TicketProductType = c.TicketProductType ?? String.Empty,
                             SiteAddress = c.SiteAddress ?? String.Empty,
                             LCONPhone = c.LCONPhone ?? String.Empty,
                             Supplier = c.Supplier ?? String.Empty,
                             SupplierOrderNumber = c.SupplierOrderNumber ?? String.Empty,
                             ConfFOCDate = c.ConfFOCDate,
                             DSLNumber = c.DSLNumber ?? String.Empty,
                             DSLLineType = c.DSLLineType ?? String.Empty,
                             JournalNote = c.JournalNote ?? String.Empty,
                             JournalLastUpdate = c.JournalLastUpdate,
                             Project = c.Project ?? String.Empty,
                             SiteICB = c.SiteICB,
                             SiteISSDueDate = c.SiteISSDueDate,
                             SiteISSInfo = c.SiteISSInfo ?? String.Empty,
                             AssignedTo = c.AssignedTo ?? String.Empty,
                             SiteSubmitDate = c.SiteSubmitDate,
                             SiteID = c.SiteID ?? String.Empty,
                             UserLogin = c.UserLogin ?? String.Empty,
                             ClientSiteType = c.ClientSiteType ?? String.Empty,
                             OpenJeop_Supp = c.OpenJeop_Supp,
                             PastDueFOC = c.PastDueFOC,
                             DaysSinceLastJNUpdate = c.DaysSinceLastJNUpdate,
                             SiteStatusID = c.SiteStatusID,
                             AssignedToID = c.AssignedToID,
                             SupplierID = c.SupplierID,
                             MasterCustID = c.MasterCustID,
                             MaxJeopSuppDate = c.MaxJeopSuppDate,
                             EstimatedTTU = c.Sit_EstTTU
                         }).ToList().AsQueryable().Where(predicate);

                gOrderCount = oList.Count();
                

                if (gOrderCount > 1500)  //we limit max number of records returned to 1500
                {
                    return null;
                }

                return oList.AsQueryable();
            }
        }
 