- public class Category
- {
- public Guid Id { get; set; }
- public string Name { get; set; }
- }
- public class Product
- {
- public Guid Id { get; set; }
- public Guid CategoryId2 { get; set; }
- public Guid CategoryId3 { get; set; }
- public string Code { get; set; }
- public string Name { get; set; }
- [ForeignKey("Category")]
- public Guid CategoryId1 { get; set; }
- public virtual Category Category { get; set; }
- }
I have these 2 tables. The Product has 3 foreign key which I need to connect in Category. I only sure about the CategoryId1 but I dont know what to do in CategoryId2 and CategoryId3. what should I do?