我有实体
Blog{ blogId, name, creatorUserId }
BlogSettings{ blogId, userId, column1 }
现在我有一个方法可以接受blogId并且userId我正在查询Blog(not BlogSettings)
Blog包含BlogSettings.
我该怎么做?
如果我写context.Blogs.Include("BlogSettings").Where( b => b.BlogId == blogId)那将是非常低效的,因为我只需要 userId == userId 的 BlogSettings。
Note:我没有在 BlogSettings 上查询。如您所见,我正在查询博客集合。