0
我有一个带有注释图像的aspx网站。表格的结构是:EntityFramework选择最多评论图片
Table name: Images
int id (Primary Key)
varcharmax path(path of the image)
Table name: Comments
int picid; (Linked to image id)
Text text;
我需要使用实体框架选择排名前10的评论图像。这怎么可能?
图像中没有Commnents计数器。 – user1216157 2012-02-17 14:00:12
然后,您需要在实体模型中设置“图片”和“评论”之间的关联。提示:如果你的数据库有正确的FK关系,它会为你做到这一点。 – Jamiec 2012-02-17 14:16:50