I have a custom authenticantion, when user logs in, I keep the necessary information on Session/Cache...
So, I have some Views with DropDowns that must show data fil
best way: get a cached list of all users. +: database efficient. -: uses lots of memory if big table. -: result not up to date (adjust cache time).
In OData there is a database request filter which does this filter, but it is not intended to be used the way you want. It's here to protect against errors in stored procs and queries which returns rows that are not authorized for this user. This is a 2nd level of protection against data "leaks".
var model = new Model(userId)
elsewhere:
Model(Guid userID)
{
MyList = CacheStore.Get("allUsers", () => repository.GetAll())
.Where(x => x.Id == userId).ToList();
}