expression to query odata service in preprocess_query? RRS feed

  • Question

  • hi!

    I'm trying to query imported LSSecuritydataservice (oData).. I tried to create custom query which returns effective user permissions in form:

    Private Sub GetCurrentUserPermissions_PreprocessQuery(ByRef query As System.Linq.IQueryable(Of LightSwitchApplication.LS_Permission))
                Dim effective_permissions = Me.Application.User.EffectivePermissions
                query = query.Where(Function(x) effective_permissions.Contains(x.Id))
            End Sub

    but this does not work.. I'm getting "red x" without some explanation.. but I've also tried to query that specific service on IIS and there I'm getting error message:

    "The Method contains is not supported"..

    I was searching over web and find this site: http://msdn.microsoft.com/en-us/library/ee622463(v=vs.110).aspx where is stated that "contains is supported".. what I'm doing wrong? thanks!


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    Friday, April 11, 2014 8:35 AM