Similar to the OnEntityRead, OnEntityDelete, etc methods/events it would be useful to have an OnEntityGet method/event that can be implemented in the EntityController.Custom.cs class.
A use case for this is where you implement a multi-tenant system (not using the routing system as per your example) with a TenantId FK on all essential tables and you need to control that a user can only load entities from their own tenant and where you might do something like the following:
public SingleResult<Project> GetProject(int key)
{
var items = this.context.Projects.Where(i=>i.Id == key);
this.OnProjectsGet(ref items);
return SingleResult.Create(items);
}
partial void OnProjectsGet(ref IQueryable<Models.MainDb.Project> items)
{
items = items.Where(i => i.TenantId == this.GetCurrentTenantId());
}