title: EF 6 : Nested Complex type in another complex type
body: <p>Suppose that I have a Entity called "car".</p>
  
  <p>I use a complex type to define the "Engine" part.</p>
  
  <pre><code>[TableName("T_CAR")]
  public sealed class Car:IEngine
  {
    ...
    public EngineType EngineType{get;set;}
  
  }
  
  [ComplexType]
  public sealed class Engine:IEngine
  {
  
    public Engin( )
    {
      this.EnginType = new EngineType( );
    }
  
    public EngineType EngineType{get;set;}
  
    // other properties ...
  
  }
  
  [ComplexType]
  public sealed class EngineType:IEngineType
  {
    ...     
  }
  </code></pre>
  
  <p>When I run this code, I have a error message from EF 6 :</p>
  
  <p>System.InvalidOperationException: The type 'Engine' has already been configured as an entity type. It cannot be reconfigured as a complex type.</p>
  
  <p>And if I remove the definition of EngineType, it works ...</p>
  
  <p>Is there a way to add a nested complex type in another complex type ?</p>