Next, I'm modeling the domain class of a system and I'm having trouble understanding certain things of Entity Framework
, so I hope you can help me by looking at what I'm following the idea of Code First
:
In a relationship of N
to M
, doing so in the following way, will it automatically generate a new table or will I have to do this manually? If manually, how do I make this relationship?
public class Aluno {
public int Id { get; set; }
public virtual ICollection<Professor> Professores { get; set; }
}
public class Professor {
public int Id { get; set; }
public virtual ICollection<Aluno> Alunos { get; set; }
}