This may be very simple, but it's late in the night... I have two methods:
public IQueryable<Post> GetNotSticky()
{
return Get().Where(p => p.Type != PostType.Sticky);
}
And the inverse
public IQueryable<Post> GetSticky()
{
return Get().Where(p => p.Type == PostType.Sticky);
}
As you can see, the operator is the only difference. How to factorize this DRY violation into a nice common method? It feels simple, but right now the solution eludes me.