 <p>According the <a href="http://msdn.microsoft.com/en-us/library/bb384067.aspx" rel="nofollow">msdn documentation</a> from the where generic constraint you have to do it this way:</p> <pre><code>public interface IGenericRepository&lt;T&gt; where T : class </code></pre> <p>You must not have the : between the IGenericRepository&lt; T> and the where.</p>