Condividi tramite


Attributo Type (EntityType CSDL)

In Entity Data Model (EDM) l'attributo Type di un elemento Property specifica il tipo di dati che può essere assegnato alle istanze del tipo.

La definizione seguente dell'entità Department include quattro elementi Property. Ogni proprietà dispone di un attributo Type con un tipo di dati assegnato. L'assegnazione della proprietà DepartmentID è, ad esempio, Type="Int16". La proprietà DepartmentID è anche designata come proprietà Key dell'entità Department.

  <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>

Vedere anche

Concetti

Attributo Key (EntityType CSDL)
Elemento EntityType (SSDL)