假设我有以下2个模型:publicclassBlog{publicintBlogId{get;set;}publicstringUrl{get;set;}publicListPosts{get;set;}}publicclassPost{publicintPostId{get;set;}publicstringTitle{get;set;}publicstringContent{get;set;}publicBlogBlog{get;set;}}现在如果我想在DbContext中配置模型关系,它们之间有什么区别吗:modelBuilder.Entity().HasOne(p=>p.Bl
假设我有以下2个模型:publicclassBlog{publicintBlogId{get;set;}publicstringUrl{get;set;}publicListPosts{get;set;}}publicclassPost{publicintPostId{get;set;}publicstringTitle{get;set;}publicstringContent{get;set;}publicBlogBlog{get;set;}}现在如果我想在DbContext中配置模型关系,它们之间有什么区别吗:modelBuilder.Entity().HasOne(p=>p.Bl
我最近来上课ManyNavigationPropertyConfiguration,并且在该类中我找到了一个名为WithMany()的方法有2个重载。第一次重载:WithMany()Configurestherelationshiptobemany:manywithoutanavigationpropertyontheothersideoftherelationship.第二次重载:WithMany(Expression>>)Configurestherelationshiptobemany:manywithanavigationpropertyontheothersideofther