title: How do I create a generic DataContext factory?
body: <p>I'm building a generic <code>Repository&lt;T&gt;</code> class that supports Linq to SQL, and I'd like to use a factory pattern for the DataContext, because currently I have to pass the correct context to the constructor.</p>
  
  <p>Does anybody know how to determine the correct DataContext type for <code>T</code>, where <code>T</code> is a Linq to Sql Table?</p>