Query Predicates
With sauce you can speicfy a query predicate, this is automatically added to all linq queries for a particular typeYou can specify more than one per object
public class TestItemWithPredicate
{
public int ID { get; set; }
public string Name { get; set; }
public bool IsDeleted { get; set; }
[QueryPredicate]
private static IQueryable<TestItemWithPredicate> QueryPredicate(IQueryable<TestItemWithPredicate> query)
{
return query.Where(r => r.IsDeleted == false);
}
}