title: Config complex type for value object using NHibernate in C#
body: <p>I am new to DDD and NHibernate, when I try to config for table(using code-first) with NHibernate fluent.</p>
  
  <p>In EntityFramework we can use ComplexTypeConfiguration to config for value object and using that config in many table, but I have no idea how NHibernate separate config for value object like EntityFramework. </p>
  
  <pre><code>internal class EmployeeConfiguration : ClassMap&lt;Employee&gt;
  {
      public EmployeeConfiguration()
      {
          Table("Employees");
          Id(emp =&gt; emp.Id).GeneratedBy.Identity();
  
          Component(emp =&gt; emp.FullName, name =&gt;
          {
              name.Map(ele =&gt; ele.FirstName).Column("FirstName").Length(255).Not.Nullable();
              name.Map(ele =&gt; ele.LastName).Column("LastName").Length(255).Not.Nullable();
              name.Map(ele =&gt; ele.MiddleName).Column("MiddleName").Length(255).Nullable();
          });
      }
  
  }
  </code></pre>
  
  <p>I googled for find out solutions, but nothing really helpful.</p>
  
  <p>Any help is greatly appreciated, thanks.</p>