title: How can I easily filter an EF DbSet most of the time?
body: <p>I have a collection of <code>Buildings</code> in my database. Up to this point, all buildings I've needed to track have been active, so to speak. A need has now arisen, though, to include a building that has been demolished and no longer exists. It seems fairly sensible to add a nullable DateTime property called <code>Decommissioned</code> to the <code>Building</code> class to track when a building has been taken offline.</p>
  
  <p>The vast majority of my application fetches buildings by simply getting the entire set of all buildings from the DbContext. It would be a pain to add an additional <code>dbcontext.Buildings.Where(b =&gt; b.Decommissioned == null)</code> check to every instance, so filtering at the IDbSet level would be nice, but I still need these decommissioned buildings to show up in some contexts, like pulling up a resident's history of tenancies.</p>
  
  <p>The question largely boils down to, how can I have the default behavior of <code>dbContext.Buildings</code> be to get me only non-decommissioned buildings, but still ask the DB in a special way to specifically <em>include</em> decommissioned buildings when I do want them?</p>