I use CodeFirst . It is necessary to make several links between 2 tables.
Classes are like this:
public class User { public int Id { get; set; } public string Name { get; set; } public ICollection<Topic> Topics { get; set; } public User() { Topics = new List<Topic>(); } } public class Topic { public int Id { get; set; } public string Title { get; set; } public int TopicStarterId { get; set; } public User TopicStarterUserId { get; set; } public int? TopicModerId { get; set; } public User TopicModerUserId { get; set; } } Question 1: How to correctly name properties in this case? Do I correctly name TopicStarterUserId , TopicModerUserId ? Tell me, please, the naming rule for one-to-many binding.
Question 2: Which Fluent API attributes should be used if the naming does not comply with the rules? For example, I want to call TopicModerId just ModerId .
Question 3: In this example, it turns out that in order to make a second link (TopicModerId), you need to create an additional TopicModer table and link through it? If so, what will this table look like and how does it communicate with User and Topic ?