title: Many to Many relationship in Asp.Net MVC 5 with Identity table and Custom table
body: <p>I'm trying to make a relationship between the Users from the table generated by Asp.Net Identity with my own table. The relationship must be many to many, since many Users can work on the same Task (which is my table), and same time an User can work on multiple Tasks.</p>
  
  <pre><code>public class Task
  {      
      public int ID { get; set; }
      public string Name { get; set; }
  
      public string UserID { get; set; }
  
      public virtual ICollection&lt;ApplicationUser&gt; Users { get; set; }
  }
  
  public class ApplicationUser : IdentityUser
  {
      public int TaskID { get; set; }
      public virtual ICollection&lt;Task&gt; Tasks{ get; set; }
  
      // rest of the code
  }
  </code></pre>
  
  <p>I try it this way but I get an error during migration (or run time)</p>
  
  <p>"One or more validation errors were detected during model generation:"
  <a href="https://i.stack.imgur.com/VgUvZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VgUvZ.png" alt="enter image description here"></a></p>
  
  <p>Please help me solve this problem and archive what I need.</p>