title: Exception on creating a EDMX/DB-Schema using Entity Framework 4 using ContextBuilder with a generic class
body: <p>I'm using the <strong>Microsoft.Data.Entity.CTP</strong> (in the Entity Framework CTP) under the .NET 4 framework to create the EDMX metadata from my C# classes to create a database schema.</p>
  
  <p>I setup a simple model as such:</p>
  
  <pre><code>public class AModelContainer : ObjectContext
  {
      public IObjectSet&lt;RegularClass&gt; RegularClasses { 
          get { return CreateObjectSet&lt;RegularClass&gt;(); }
      }
  }
  </code></pre>
  
  <p>I follow the simple pattern of defining a new ContextBuilder based on my model.</p>
  
  <pre><code>var builder = new ContextBuilder&lt;AModelContainer&gt;();
  
  using(var context = builder.Create(new SqlConnection(connString)))
  {
      context.RegularClasses.AddObject(new RegularClass());
  
      context.SaveChanges();
  }
  </code></pre>
  
  <p><em>This works fine</em>. <strong>Until</strong> I try to do something a little more complex...</p>
  
  <p>I extend my model with a generic class</p>
  
  <pre><code>public class AModelContainer : ObjectContext
  {
      public IObjectSet&lt;SpecialClass&lt;string&gt;&gt; SpecialClasses { 
          get { return CreateObjectSet&lt;SpecialClass&lt;string&gt;&gt;(); }
      }
  }
  </code></pre>
  
  <p>Now on the save I get an <strong>exception</strong>:</p>
  
  <blockquote>
    <p>Mapping and metadata information could not be found for EntityType 'Prototype.SpecialClass`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]'.</p>
  </blockquote>
  
  <p>On this line in the <em>AModelContainer</em>:</p>
  
  <pre><code>return CreateObjectSet&lt;SpecialClass&lt;string&gt;&gt;();
  </code></pre>
  
  <p>The default constructor of my generic 'SpecialClass' does nothing at the moment, should it? </p>
  
  <pre><code>public class SpecialClass&lt;T&gt; 
  {
      public SpecialClass()
      { }
  }
  </code></pre>
  
  <p>Or is this an issue with the <em>ContextBuilder</em> not knowing what to do exactly, is there a way to use builder.ComplexType(), or other method to guide it?</p>
  
  <p>Or the CTP can't deal with this scenario yet...</p>
  
  <p>That "<em>`1</em>" after my class name also doesn't sit well with me in the exception...</p>