TypeName 属性 (EntityTypeMapping)
在 实体数据模型 (EDM) 中,EntityTypeMapping 元素的 TypeName 属性指定了概念架构中映射到存储元数据中描述的表的实体的完全限定名。映射规范语言 (MSL) 中的 EntityType 元素上的 TypeName 属性可以接受类型的完全限定名或 IsTypeOf("fully qualified Name")
(主要在继承方案中定义映射时使用)。有关更多信息,请参见继承 (EDM)。
以下语法包括 EntitySetMapping 元素,该元素包含一个 EntityTypeMapping 元素,该元素的 TypeName 属性标识 AdventureWorksHRModel 实体容器中的 Department 实体。MappingFragment 和 ScalarProperty 元素将 Department 实体及其属性映射到某个表和它的列。
<EntitySetMapping Name="Department">
<EntityTypeMapping TypeName="AdventureWorksHRModel.Department">
<MappingFragment TableName="Department">
<ScalarProperty Name="DepartmentID"
ColumnName="DepartmentID" />
<ScalarProperty Name="Name" ColumnName="Name" />
<ScalarProperty Name="GroupName"
ColumnName="GroupName" />
<ScalarProperty Name="ModifiedDate"
ColumnName="ModifiedDate" />
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
另请参见
概念
EntityType 元素 (CSDL)
EntityType 元素 (SSDL)
EntityContainer 元素 (CSDL)
EntityContainer 元素 (SSDL)
EntityContainerMapping 元素 (MSL)
AdventureWorks 完整模型 (EDM)