Documentation 元素 (SSDL)

以存储架构定义语言 (SSDL) 表示的 Documentation 元素可用于提供有关在父元素中定义的对象的信息。

Documentation 元素可以具有以下子元素(按所列顺序):

  • Summary:有关父元素的简短说明。 (零个或一个元素)

  • LongDescription:有关父元素的详细说明。 (零个或一个元素)

适用的特性

可以将任何数量的批注特性(自定义 XML 特性)应用于 Documentation 元素。 然而,自定义特性可能不属于为 CSDL 保留的任何 XML 命名空间。 任何两个自定义特性的完全限定名称都不能相同。

示例

下面的示例演示 Documentation 元素,它用作 EntityType 元素的子元素。

<EntityType Name="Customers">
  <Documentation>
    <Summary>Summary here.</Summary>
    <LongDescription>Long description here.</LongDescription>
  </Documentation>
  <Key>
    <PropertyRef Name="CustomerId" />
  </Key>
  <Property Name="CustomerId" Type="int" Nullable="false" />
  <Property Name="Name" Type="nvarchar(max)" Nullable="false" />
</EntityType>

另请参见

概念

实体框架概述
SSDL 规范

其他资源

CSDL、SSDL 和 MSL 规范
ADO.NET Entity Data Model Tools