Search code examples
c#.netwcf-ria-services

Non-invocable method error


I try to use SQL SERVER VIEW within RIA Services.

So I created some view and updated EDMX.

Now I try to create some RIA Services method like

public IQueryable<ErrorsFullView> GetErrorsFullViews()
{
   return this.ObjectContext.ErrorsFullViews();
}

But get an error:

Non-invocable member '.....ErrorsFullViews' cannot be used like a method.

Any clue how it could be fixed?

Thank you!


Solution

  • as the error says, ErrorsFullViews is not a method. Try to remove the parenthesis :

    public IQueryable<ErrorsFullView> GetErrorsFullViews()
    {
       return this.ObjectContext.ErrorsFullViews;
    }