我正在使用带有 EF 的 Visual Studio 2010 (SP1)。当我尝试更新应用程序的 edmx 文件时,文件的 SSDL 内容部分被清空。结果是每个实体的映射细节都被清空,这意味着已经存在的表不会刷新。
例如,SSDL 内容部分以前看起来像这样:
<!-- SSDL content -->
<edmx:StorageModels>
<Schema Namespace="DataAccess.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2005" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
<EntityContainer Name="DataAccessStoreContainer">
<EntitySet Name="Amdec" EntityType="DataAccess.Store.Amdec" store:Type="Tables" Schema="dbo" />
...
之后,我得到了:
<!-- SSDL content -->
<edmx:StorageModels>
<Schema Namespace="DataAccess.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2005" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
**<EntityContainer Name="DataAccessStoreContainer"/>**
有什么线索吗?