You should return IHttpActionResult
because you can be more specific to the client. You can create more user friendly web applications. Basically you can return different HTML status messages for different situations.
For example:
public async Task<IHttpActionResult> GetMyItems()
{
if(!authorized)
return Unauthorized();
if(myItems.Count == 0)
return NotFound();
//... code ..., var myItems = await ...
return Ok(myItems);
}
IEnumerable
and IQueryable
will just parse your data into the output format and you will not have a proper way to handle exceptions. That is the most important difference.