Full Stack Web Developer

Recently I came across an error when working with oData and web API.

Cannot serialize a null ‘feed’.

I couldn’t really find a solution online, but it turns out i just forgot to decorate my method parameter with [FromODataUri].

public IQueryable Get([FromODataUri] ODataQueryOptions queryOptions)

Now you can use $expand and $select in your URL without issues.

Leave a Reply

Your email address will not be published. Required fields are marked *