View on GitHub

SauceDB

.net ORM with multipe database engine support.

Download this project as a .zip file Download this project as a tar.gz file

Query Predicates

With sauce you can speicfy a query predicate, this is automatically added to all linq queries for a particular type
You 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);
    }
}