【问题标题】:How to change schema with Fluent NHibernate AutoMapping如何使用 Fluent NHibernate AutoMapping 更改架构
【发布时间】:2009-11-27 10:21:28
【问题描述】:

在我的数据库中,每个表都属于一个模式(例如 Person。)我正在使用 Fluent NHibernate 和 Automapping,我的问题是如何设置我想要使用的模式。

【问题讨论】:

    标签: fluent-nhibernate fluent


    【解决方案1】:

    使用convention,特别是IClassConvention

    【讨论】:

      【解决方案2】:
      public class SchemaConvention : IClassConvention
      {
          public void Apply(IClassInstance instance)
          {
              instance.Schema("schemaNameGoesHere");
          }
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2010-11-25
        • 1970-01-01
        • 2010-10-09
        • 1970-01-01
        • 1970-01-01
        • 2011-07-22
        • 2011-12-10
        • 1970-01-01
        相关资源
        最近更新 更多