Answer the question
In order to leave comments, you need to log in
How to implement a one-to-many relationship in a single EF CodeFirst table?
Good afternoon! How to make a one-to-many relationship in one table?
public class Author
{
public Author()
{
Followers = new List<Author>();
}
public int Id { get; set; }
[Required]
[MaxLength(100)]
public string Name { get; set; }
public virtual List<Author> Followers { get; set; }
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question