title: Entity Framework - logical deletion on collections
body: <p>I'm curious on an elegant solution for POCOs with Entity Framework, with collections of logically deleted children.</p>
  
  <p>This is trivial to implement in a repository or over a DbSet, but when it comes to controlling the population of various <code>ICollection</code> based properties of a class can we prevent logically deleted items being retrieved by Entity Framework?</p>
  
  <p>For example, the majority of my entities have a DeleteStamp, which indicates whether an item is logically deleted. Is there a way to tell Entity Framework to populate its collections but to ignore items for example <code>WHERE DeleteStamp IS NULL</code>.</p>
  
  <p>This could be accomplished in nHibernate for example when declaring a <code>&lt;set /&gt;</code> element and specifying the <code>where</code> parameter.</p>