As seems to be popular at the moment, if you implement a repository as simply
IQueryable<T> FetchAll<T>();
using LINQ to SQL, then the repository must set up a DataContext which remains available outside of the repository.
So my question is, How does the DataContext get Disposed? What if an exception is generated by the code outside of the repository? Will it be leaking database connections?
Thanks