title: C# implement interface on "where TEntity : class"
body: <p>I'm relatively new to <strong>.NET</strong> and I've stumbled on this particular issue: while following a tutorial on repository pattern, the definition of the class goes like this:</p>
  
  <pre><code>public class GenericRepository&lt;TEntity&gt; where TEntity : class { ...
  </code></pre>
  
  <p>That being said, this class is supposed to implement an interface. Since I already used the <code>:</code> operator, how do I do that?</p>
  
  <p>I tried going <code>public class GenericRepository&lt;TEntity&gt; : IGenericRepository where TEntity : class {</code> and also <code>public class GenericRepository&lt;TEntity&gt; where TEntity : class : IGenericRepository {</code> but it doesnt work</p>