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.
Comments: [Fixed](https://aspnetwebstack.codeplex.com/SourceControl/changeset/e18760b301e9632eb3731497b49ace5f732bdabb).
/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.
Comments: [Fixed](https://aspnetwebstack.codeplex.com/SourceControl/changeset/e18760b301e9632eb3731497b49ace5f732bdabb).