【问题标题】:How do you rename auto-generated associative tables in Entity Framework code first?如何首先在实体框架代码中重命名自动生成的关联表?
【发布时间】:2012-12-11 19:36:15
【问题描述】:

我知道如何根据映射到它们的类在 OnModelCreating() 方法中命名表和指定模式。即,

modelBuilder.Entity<Customer>().ToTable("Customers", schemaName: "Ordering");

但是导致自动生成关联表的多对多关系呢?

【问题讨论】:

    标签: entity-framework-4.1 ef-code-first


    【解决方案1】:

    没关系,在这里找到答案:

    Mapping association tables in EF 4.1 code first

    由于某种原因,我在最初搜索现有帖子时没有遇到此问题。

    【讨论】:

      猜你喜欢
      • 2016-09-28
      • 1970-01-01
      • 1970-01-01
      • 2011-05-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多