【发布时间】:2012-09-29 01:23:02
【问题描述】:
我在 VS2012RC 中创建了一个 mvc4 webapi 项目,并在我的项目中首先使用 EF4.3 进行代码。
我使用了默认的会员服务提供商。如何在另一个模型中使用 UserName 作为外键。
我试过这段代码,
[ForeignKey("RegisterModel")]
public string UserName { get; set; }
public virtual RegisterModel User { get; set; }
我的代码有什么问题吗?
请帮忙
谢谢,
【问题讨论】:
标签: entity-framework-4 asp.net-mvc-4 asp.net-web-api