Name 属性 (EntityType CSDL)

在 实体数据模型 (EDM) 中,概念性架构定义语言 (CSDL) 中的 EntityType 元素包含一个 Name 属性,该属性标识在正在设计的对象模型中以及映射规范中的类型。

下面来自 Adventure Works 数据库的 Human Resources 部分的声明演示 Department 实体声明。Name 属性的指定方式为:Name="Department"Department 实体的每个属性 (Property) 还有一个 Name 属性 (Attribute)。

  <EntityType Name="Department" 
    <Key>
        <PropertyRef Name="DepartmentID">
    </Key>
    <Property Name="DepartmentID" Type="Int16" Nullable="false" />
    <Property Name="Name" Type="String" Nullable="false" />
    <Property Name="GroupName" Type="String" Nullable="false" />
    <Property Name="ModifiedDate" Type="DateTime" Nullable="false" />
  </EntityType>

另请参见

概念

Name 属性 (EntityType SSDL)
TypeName 属性 (EntityTypeMapping)
AdventureWorks 完整模型 (EDM)