0
我有以下类别:的EntityFramework创建额外的列
public partial class User
{
[Key]
public int UserId { get; set; }
public string Username { get; set; }
[ScriptIgnore]
public virtual ICollection<Subscription> Followers { get; set; }
[ScriptIgnore]
public virtual ICollection<Subscription> Following { get; set; }
}
public partial class Subscription
{
[Key]
public int SubscriptionId { get; set; }
public virtual User Follower { get; set; }
public virtual User Followed { get; set; }
public int status { get; set; }
}
的用户表中生成正常,但订阅表是这样的:
Subscriptions(SubscriptionId, status, Follower_UserId, Followed_UserId,
User_UserId, User_UserId1)
这最后两个栏都没有necesary他们实际上是NULL值
这些列是映射所必需的。问题是列名没有意义。 – Eranga