我正在使用EF4和SQL Server 2008.我在数据库中有一个摘要View,我试图通过Update Model from Database将它添加到edmx文件中。但是它在视图上要求主键时出错。但是我的视图没有主键并且只读 - 如何添加视图??
错误是
Message 6 The table/view 'SurveyReports.dbo.vw_responserate' does not have a primary key defined and no valid primary key could be inferred. This table/view has been excluded. To use the entity, you will need to review your schema, add the correct keys, and uncomment it. F:\SurveyReports\SurveyReports\SurveyReports\SurveyReports\DAL\Reports.edmx 0 0 SurveyReports