IT:AD:OData

[Queryable]
public IQueryable<Category> GetCategories()
{
    return db.Categories;
}
For single entities, return a SingleResult<T>, where T is an IQueryable that contains zero or one entities.

[Queryable]
public SingleResult<Category> GetCategory([FromODataUri] int key)
{
    return SingleResult.Create(db.Categories.Where(c => c.ID == key));
}

Application Facade (API)Application ServicesInfrastructure ServicesDomain ServicesApiControllerApplicationServiceInfrastructureServiceDomainService