Entity Framework Many to Many works but Include does not
问题 I have a typical many-to-many relationship with these 3 tables [Post] ( [PostId] int, (PK) [Content] nvarchar(max) ... ) [Tag] ( [TagId] int, (PK) [Name] nvarchar ... ) [TagPost] ( [TagId] int, (PK, FK) [PostId] int (PK, FK) ) And, TagId and PostId are the PK and FK set on the tables accordingly etc. Then I have these classes and mapping in c# public class Post { public Post() { this.Tags = new HashSet<Tag>(); } [Key] public int PostId { get; set; } ... public virtual ICollection<Tag> Tags {