title: Mapping Properties of type of Complex Type to DB Columns in EF 6 using code first and custom EntityTypeConfiguration implementation
body: <p>This is my first activity with great stack overflow, but absolutely not my first time to visit the website.</p>
  
  <p>My Question:<br />
  In our project, we are extending the EntityTypeConfiguration to take control over the mapping of entities to the DB in code first fluent API.<br />
  What I am confused with is how it is possible to include the configuration of complex types in the ctor of derived configuration, i.e. The configuration of primitive properties is possible through "Property" method of base EntityTypeConfiguration, but when calling this method on properties of type of Complex Types, the project builds will stop at called method.</p>
  
  <p>Actually, the DB will be generated by entity table containing multiple columns, representing the fields of the embedded Complex Type using <code>"PROPERTYNAME_INNERFIELDNAME"</code> naming convention, even though if the complex type be of class type.<br /><br />
  So, I do not know how to overcome with the issue if the complex type be of class type.</p>
  
  <p>Thank you for your kind consideration.</p>
  
  <p>My Code:<br /></p>
  
  <pre><code>class Entity
  {
      long Id;
      Address Addr;
  }
  
  class Address
  {
      string City;
      string ZipCode;
  }
  
  class EntityConfig : EntityTypeConfiguration&lt;Entity&gt;
  {
      EntityConfig()
      {
          Property(p=&gt;p.Addr);  //Build error
      }
  }
  </code></pre>