title: Call static method from generic type
body: <p>I has static class with generic argument which declared like this:</p>
  
  <pre><code>public static partial class CMSLib&lt;TUser&gt; where TUser : CMSLib&lt;TUser&gt;.UserBase
  {
      public abstract class UserBase : OrmObject&lt;TUser&gt;
      {
          public UInt32 Id { get; set; }
          public string Login { get; set; }
          /* etc. */
      }
  }
  </code></pre>
  
  <p><code>OrmObject</code> declared like this:</p>
  
  <pre><code>public abstract class OrmObject&lt;T&gt; where T: class
  {
      static OrmObject()
      {
          using (var db = Db.Open())
              db.CreateTable&lt;T&gt;();
      }
  
      public static T Single(Expression&lt;Func&lt;T, bool&gt;&gt; where) { ... }
  }
  </code></pre>
  
  <p>When i trying call method <strong>Single</strong> from generic parameter:</p>
  
  <pre><code>public static partial class CMSLib&lt;TUser&gt; where TUser : CMSLib&lt;TUser&gt;.UserBase
  {
      public static TUser SomeFunction()
      {
          var user = TUser.Single(...); // Here error
          ...
      }
  }
  </code></pre>
  
  <p>I got error <strong>'TUser' is a 'type parameter', which is not valid in the given context</strong></p>
  
  <p>How in this case i can call <strong>TUser.Single</strong> method (static constructor in <code>OrmObject</code> must be called)?</p>