sreejithenc
Programmer
- Mar 25, 2013
- 2
public List<AutoPublishLog> FetchList(int pageID, DateTime startDate, DateTime endDate, bool? pageStatus, List<ProductID> productID, int recordLimit)
{ var query = _unitOfWork.AutoPublishLogRepository.FetchQueryable(null, "AutoPublishLogWarnings", true);
var resultList = (from r in query
where (r.PageID == pageID && r.LastSaved >= startDate && r.LastSaved <= endDate &&
((pageStatus != null && ((pageStatus == true && r.PublishDate != null) || (pageStatus == false && r.PublishDate == null)))
|| pageStatus == null) && r!=null && productID.Contains(r.ProductID)
)
//TODO:add the filter productID and AutoPublishWarningStatusID.Valid =(Int32)Objects.PrimaImq.Constants.AutoPublishWarningStatusID.Valid
select r).Take(recordLimit).ToList();
return resultList;
}
How to include this condition- filter the product ids in resultList from the id's in the parameter " List<ProductID> productID
{ var query = _unitOfWork.AutoPublishLogRepository.FetchQueryable(null, "AutoPublishLogWarnings", true);
var resultList = (from r in query
where (r.PageID == pageID && r.LastSaved >= startDate && r.LastSaved <= endDate &&
((pageStatus != null && ((pageStatus == true && r.PublishDate != null) || (pageStatus == false && r.PublishDate == null)))
|| pageStatus == null) && r!=null && productID.Contains(r.ProductID)
)
//TODO:add the filter productID and AutoPublishWarningStatusID.Valid =(Int32)Objects.PrimaImq.Constants.AutoPublishWarningStatusID.Valid
select r).Take(recordLimit).ToList();
return resultList;
}
How to include this condition- filter the product ids in resultList from the id's in the parameter " List<ProductID> productID