title: Fluent NHibernate, dynamically change Table of mapping?
body: <p>with fluent nhibernate, is there a way to dynamically switch the table of a mapping at runtime?</p>
  
  <p>For example:</p>
  
  <pre><code>public class XYClassMap : ClassMap&lt;XY&gt;
  {
    public XYClassMap( )
    {
      Table("XYTable");
      Id(d =&gt; d.Id).GeneratedBy.Identity();
      Map(d =&gt; d.Value);
      (...)
  </code></pre>
  
  <p>Given that there are multiple plugins, each of them uses this one class, but they need to work with different tables. I am looking for something like this:</p>
  
  <pre><code>public class XY {
    public string Tablename {get; set;}
  }
  
  public class XYClassMap : ClassMap&lt;XY&gt;
  {
    public XYClassMap( )
    {
      Table(Tablename);
      Id(d =&gt; d.Id).GeneratedBy.Identity();
      Map(d =&gt; d.Value);
      (...)
  </code></pre>
  
  <p>So every action method could work with the same class and only would need to set this one property "Tablename".</p>
  
  <p>Thanks for any help,</p>
  
  <p>Steffen</p>