title: Generic repository - IRepository<T> or IRepository
body: <p>I have seen two different approaches for creating generic repositories. What are differences between those two approaches (pros and cons) ?
  Please diregard difference in the methods because I am interested in difference between </p>
  
  <pre><code> public interface IRepository&lt;T&gt; where T : class
  </code></pre>
  
  <p>and  </p>
  
  <pre><code> public interface IRepository : IDisposable
  </code></pre>
  
  <p>Is there any difference in functionality, flexibility, unit testing ... ? What will I get or lose ?<br>
  Is there any difference how they are registered in Dependency Injection frameworks ?</p>
  
  <p><strong>Option 1</strong></p>
  
  <pre><code> public interface IRepository&lt;T&gt; where T : class
   {
         T Get(object id);
         void Attach(T entity);
         IQueryable&lt;T&gt; GetAll();
         void Insert(T entity);
         void Delete(T entity);
         void SubmitChanges();
   }
  </code></pre>
  
  <p><strong>Option 2</strong></p>
  
  <pre><code> public interface IRepository : IDisposable
      {
          IQueryable&lt;T&gt; GetAll&lt;T&gt;();
          void Delete&lt;T&gt;(T entity);
          void Add&lt;T&gt;(T entity);
          void SaveChanges();
          bool IsDisposed();
      }
  </code></pre>