I am having my first steps in EF 5.0 I have a many to many relationship. Movie can Have multiple Types and Type can have multiple Movies
public class Movie
{
public int MovieId { get; set; }
[Required]
public string Name { get; set; }
public virtual ICollection<Type> Types { get; set; }
}
public class Type
{
public int TypeId { get; set; }
public string MovieType { get; set; }
public virtual ICollection<Movie> Movies { get; set; }
}
When I generated the Database it creates many-to-many between Movie and type
So, What should i do to seed this many to many table? I tried many solution posted here but it didn't works.
Also, is this the best way to Generate a Many-To-Many Relation using EF code first