title: What's the convention for extending Linq datacontext with set based helper operations specific to one collection of entities only
body: <p>I might be vaguing out here but I'm looking for a nice place to put set based helper operations in linq so I can do things like;</p>
  
  <pre><code>db.Selections.ClearTemporary()
  </code></pre>
  
  <p>which does something like</p>
  
  <pre><code>db.DeleteAllOnSubmit(db.Selections.Where(s =&gt; s.Temporary))
  </code></pre>
  
  <p>Since I can figure out how to extend <code>Table&lt;Selection&gt;</code> the best I can do is create a static method in partial class of Selection (similar to Ruby)  but I have to pass in the datacontext like;</p>
  
  <pre><code>Selection.ClearTemporary(MyDataContext)
  </code></pre>
  
  <p>This kind of sucks because I have two conventions for doing set based operations and I have to pass the data context to the static class.  </p>
  
  <p>I've seen other people recommending piling helper methods into a partial of the datacontext like;</p>
  
  <pre><code>myDataContext.ClearTemporarySelections();
  </code></pre>
  
  <p>But I feel this makes the dc a dumping ground for in-cohesive operations.  </p>
  
  <p>Surely I'm missing something.  I hope so.  What's the convention?  </p>