Custom class Identity / Entity Framework many-to-many relationship
<p>I'm using Entity Framework, Asp.net Identity and MVC in c# in order to create my website.</p>

<p>Trying to implement a "group" feature I've been facing a problem...
I implemented the casual (based on this : <a href="https://stackoverflow.com/questions/7050404/create-code-first-many-to-many-with-additional-fields-in-association-table">Create code first, many to many, with additional fields in association table</a>):</p>

<pre><code>public class ApplicationUser : IdentityUser
{

    [...]

    public virtual List&lt;Group&gt; Groups { get; set; }
}
</code></pre>

<p>And :</p>

<pre><code>public class Group
{
    public int GroupID { get; set; }
    [Required]
    [StringLength(100, MinimumLength = 2)]
    public string Name { get; set; }

    public virtual List&lt;ApplicationUser&gt; Members { get; set; }
}
</code></pre>

<p>And the link class with an extra attribute (status) :</p>

<pre><code>public class ApplicationUserGroup
{
    [Key, Column(Order = 0)]
    public string ApplicationUserId { get; set; }
    [Key, Column(Order = 1)]
    public int GroupId { get; set; }

    public virtual ApplicationUser ApplicationUser { get; set;}
    public virtual Group Group { get; set; }

    // 1 : simple member
    // 2 : administrator
    public int Status { get; set; }

    public ApplicationUserGroup()
    {
        Status = 1;
    }
}
</code></pre>

<p>I managed to get my table into my DB as ApplicationUserGroups but Entity keep generating another table GroupApplicationUsers without my status field...</p>

<p>I believe the problem comes from Identity, anyone to help me ?</p>

<p>PS: Sorry for my english, I'm french ^^</p>