I'd like to build some linq or alternatively, build a query string on the fly and pass it to a WCF Data Service (with Entity Framework data model).
Something like this:
public List<DocumentInformationRecord> SearchClientDocs(string clientCode,
string clientName, string contactName, string groupCode, string groupName,
string filename, string createdby, DateTime dateFrom, DateTime dateTo)
{
List<DocumentInformationRecord> results = new List<DocumentInformationRecord>();
if(!string.IsNullOrEmpty(clientCode))
//Add the client code clause...
etc..
var qry = from c in context.DocumentInformationRecord.where(dynamicQuery);
//Etc......
Any ideas? I tried the predicate builder (http://www.albahari.com/nutshell/predicatebuilder.aspx) but got some invalid operation exceptions.....