Reputation: 10153
I am using LINQPad to run the following query:
var pds = (from p in Projects
group p by p.FiscalYearVariables.FiscalYear into grouped
where grouped.Count() > 0
select new {
fiscalYear = grouped.Key,
projectDetails = grouped.SelectMany(a=>a.ProjectDetails),
Programs = (from pwbs in Programs.SelectMany(a =>a.ProgramWbsNumbers)
let ds = pwbs.WbsNumbers.DisplayString
where pwbs.Programs.IsActive
&& (from w in WbsNumbers
where w.DisplayString.StartsWith(ds)
select w).Any()
select pwbs.Programs)
});
pds.Dump();
And I get the error:
NotSupportedException: Only arguments that can be evaluated on the client are supported for the String.StartsWith method.
I'm not sure how to go about correcting this error. I need to get each Program
where the WbsNumber
starts with the WbsNumber
contained within ProgramWbsNumbers
if that helps.
Upvotes: 2
Views: 961