原文发布时间为:2011-05-17 —— 来源于本人的百度文章 [由搬家工具导入]

需要在 Context 中,重写 DbContext 中的 OnModelCreating 方法 进行 mapping 如下:

 

protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
            modelBuilder.Entity<TestDB_Category>()
                .ToTable("TestDB.Category","dbo");
}

相关文章:

  • 2022-03-03
  • 2022-12-23
  • 2021-08-16
  • 2021-12-21
  • 2022-12-23
  • 2021-11-17
  • 2021-08-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2021-05-30
  • 2022-12-23
  • 2021-07-26
相关资源
相似解决方案