I have an Expression<func<Portfolio, bool>> and I want to add an extra condition if an expression is true, here is my code,
Expression<Func<Portfolio, bool>> condition = x =>
x.Client == Params.Client
&& x.AnalysisDate == Params.AnalysisDate
&& x.AsOf <= Params.ReportDate
if (Params.Names.Any())
{
//Here I want to add an extra condition to add the following to the condition
&& portfoliosParams.Names.Contains(x.Name);
}
Any ideas?