我想从数据库中更新model.edmx,因为我已经更新了sql-server中的视图。
我已经从model.edmx中删除了视图,然后从数据库转到更新模型,并尝试再次添加该视图,但是它不会用更新的视图刷新...我做错了吗?< / p>
我转到文件的XML编辑器,并且在更新模型时显示:
<!--Errors Found During Generation:
warning 6013: The table/view 'CodeBoxxSchool_Dev.dbo.Graduated Students' 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.
<EntityType Name="Graduated Students">
<Property Name="ID" Type="int" />
<Property Name="CohortId" Type="int" />
<Property Name="GraduationStatus" Type="nvarchar" MaxLength="150" />
<Property Name="Name" Type="nvarchar" MaxLength="100" />
<Property Name="FirstName" Type="nvarchar" MaxLength="100" />
<Property Name="LastName" Type="nvarchar" MaxLength="100" />
<Property Name="ContractStatus" Type="nvarchar" MaxLength="50" />
<Property Name="DepositStatus" Type="nvarchar" MaxLength="50" />
<Property Name="PartnerId" Type="int" />
<Property Name="Expr1" Type="nvarchar" MaxLength="250" />
</EntityType>-->