Given the following code:
var time = ctx.Time.First();
var notes = time.Notes.ToList();
This will actually run 2 queries against the database.
Basically, I need to tap into the expression tree and do some custom checking to not return records where the deleted flag is set.
I can do this in the first call by deriving my own class from IDbSet and using
Expression IQueryable.Expression
{
... Add custom expression here
}
However, I don't know how to do override the expression tree in the 2nd call.
Any advice?