I'm building a generic Repository<T> 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.
Does anybody know how to determine the correct DataContext type for T, where T is a Linq to Sql Table?