【发布时间】:2011-12-31 04:00:00
【问题描述】:
这似乎是一个简单的问题,但我似乎找不到答案。
我有一个看起来像这样的模型......
public class Application
{
public int Id { get; set; }
public string Title { get; set; }
public string LeadProgrammer { get; set; }
public string ConnectionStringCode { get; set; }
}
public class ApplicationDBContext : DbContext
{
public DbSet<Application> Applications { get; set; }
}
我的实际表名是 DBA_APPLICATIONS ... 当然,模型只是在寻找 dbo.Applications。如何将此路由更改为实际表?
【问题讨论】:
-
您查看过映射吗?您的类名可以映射到不同的表名。
标签: c# asp.net asp.net-mvc entity-framework