Resource not found for segment 'x'

I get this error: resource not found for segment "GetTest".

The code is as follows:

    [WebGet]
    public IQueryable<string> GetTest()
    {
        var tmp = new List<string>();
        return tmp.AsQueryable();
    }

Any ideas what is wrong?

+5
source share
1 answer

"Resource not found for segment" when searching for a primary key that does not exist

try with try-catch

try  
{  
   var tmp = new List<string>();
   return tmp.AsQueryable();
}  
catch( DataServiceQueryException ex )  
{  
   return null;
}  
0
source

All Articles