I'm getting the exception: Method not supported: All
on the last line, below:
private static Expression<Func<InstallationSummary, bool>> GetWhereClause(ApplicationServer appServer, ApplicationWithOverrideVariableGroup appWithGroup)
{
// If we're getting matches that include CustomVariableGroups (CVGs), then the number of CVGs and the IDs must match.
return summary => summary.ApplicationServerId == appServer.Id &&
summary.ApplicationWithOverrideVariableGroup.ApplicationId == appWithGroup.Application.Id &&
summary.ApplicationWithOverrideVariableGroup != null &&
summary.ApplicationWithOverrideVariableGroup.CustomVariableGroupIds != null &&
summary.ApplicationWithOverrideVariableGroup.CustomVariableGroupIds.Count == appWithGroup.CustomVariableGroupIds.Count &&
summary.ApplicationWithOverrideVariableGroup.CustomVariableGroupIds.All(appWithGroup.CustomVariableGroupIds.Contains);
}
Is there another option to use instead of All()
, or do I need to bring back the results and loop through them in memory?
public class ApplicationWithOverrideVariableGroup : EntityBase
{
// More code here
public List<string> CustomVariableGroupIds { get; set; }
// More code here
}