-
-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
I have a class Project that contains a collection of ProjectResourceMembers.
My filter is defined like this:
//Security
modelBuilder.Filter("ProjectFilter",
(Project p, string resourceCode) => (p.ProjectResourceMembers.Any(x => x.ResourceCode.ToLower() == GetResourceCodeFromPrincipal(Thread.CurrentPrincipal))
&& p.IsConfidential == true) || p.IsConfidential == false,
() => GetResourceCodeFromPrincipal(Thread.CurrentPrincipal));
modelBuilder.EnableFilter("ProjectFilter", () => !string.IsNullOrEmpty(GetResourceCodeFromPrincipal(Thread.CurrentPrincipal)));
However, when I query the context (via OData), I get this exception:
variable 'x' of type 'DataHub.Provider.Models.Atomic.ProjectResourceMember' referenced from scope '', but it is not defined
The error seems to be related to x.ResourceCode.ToLower()... Any idea what the error might be?
Metadata
Metadata
Assignees
Labels
No labels