I have the following classes:
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; }
}
The users table is generated fine but the Subscriptions table goes like this:
Subscriptions( SubscriptionId, status, Follower_UserId, Followed_UserId,
User_UserId, User_UserId1 )
These two last columns are not necesary and they are getting in fact NULL values