Quantcast
Channel: ASP.NET MVC / Web API / Web Pages
Viewing all articles
Browse latest Browse all 7925

Edited Issue: Serializing IQueryable doesn't work [1166]

$
0
0
When trying a query like

/prefix/Customers?$expand=Orders

and having the following body:

```
IQueryable result = options.ApplyTo(customers);
if (result.ElementType != null && typeof(IEdmObject).IsAssignableFrom(result.ElementType))
{
IQueryable<IEdmEntityObject> edmObjects = result as IQueryable<IEdmEntityObject>;
return Ok(edmObjects);
}
else
{
return Ok(result as IQueryable<Customer>);
}
```

the result is a 406, when it should be 200 and the serialized feed.

Viewing all articles
Browse latest Browse all 7925

Trending Articles