EdmEntityType Class

Definition

Represents a definition of an EDM entity type.

public class EdmEntityType : Microsoft.OData.Edm.EdmStructuredType, Microsoft.OData.Edm.IEdmEntityType, Microsoft.OData.Edm.IEdmFullNamedElement
type EdmEntityType = class
    inherit EdmStructuredType
    interface IEdmEntityType
    interface IEdmStructuredType
    interface IEdmType
    interface IEdmElement
    interface IEdmSchemaType
    interface IEdmSchemaElement
    interface IEdmNamedElement
    interface IEdmVocabularyAnnotatable
    interface IEdmFullNamedElement
Public Class EdmEntityType
Inherits EdmStructuredType
Implements IEdmEntityType, IEdmFullNamedElement
Inheritance
Implements

Constructors

EdmEntityType(String, String)

Initializes a new instance of the EdmEntityType class.

EdmEntityType(String, String, IEdmEntityType)

Initializes a new instance of the EdmEntityType class.

EdmEntityType(String, String, IEdmEntityType, Boolean, Boolean)

Initializes a new instance of the EdmEntityType class.

EdmEntityType(String, String, IEdmEntityType, Boolean, Boolean, Boolean)

Initializes a new instance of the EdmEntityType class.

Properties

BaseType

Gets the base type of this type.

(Inherited from EdmStructuredType)
DeclaredKey

Gets the structural properties of the entity type that make up the entity key.

DeclaredProperties

Gets the properties declared immediately within this type.

(Inherited from EdmStructuredType)
FullName

Gets the full name of this schema element.

HasStream

Gets the value indicating whether or not this entity is a media type This value inherits from the base type.

IsAbstract

Gets a value indicating whether this type is abstract.

(Inherited from EdmStructuredType)
IsOpen

Gets a value indicating whether this type is open.

(Inherited from EdmStructuredType)
Name

Gets the name of this element.

Namespace

Gets the namespace this schema element belongs to.

PropertiesDictionary

Gets a dictionary of the properties in this type definition for faster lookup.

(Inherited from EdmStructuredType)
SchemaElementKind

Gets the kind of this schema element.

TypeKind

Gets the kind of this type.

Methods

AddBidirectionalNavigation(EdmNavigationPropertyInfo, EdmNavigationPropertyInfo)

Creates and adds a navigation property to this type and adds its navigation partner to the navigation target type.

AddKeys(IEdmStructuralProperty[])

Adds the keyProperties to the key of this entity type.

AddKeys(IEnumerable<IEdmStructuralProperty>)

Adds the keyProperties to the key of this entity type.

AddProperty(IEdmProperty)

Adds the property to this type. DeclaringType of the property must be this type.

(Inherited from EdmStructuredType)
AddStructuralProperty(String, EdmPrimitiveTypeKind)

Creates and adds a nullable structural property to this type.

(Inherited from EdmStructuredType)
AddStructuralProperty(String, EdmPrimitiveTypeKind, Boolean)

Creates and adds a nullable structural property to this type.

(Inherited from EdmStructuredType)
AddStructuralProperty(String, IEdmTypeReference)

Creates and adds a structural property to this type.

(Inherited from EdmStructuredType)
AddStructuralProperty(String, IEdmTypeReference, String)

Creates and adds a structural property to this type.

(Inherited from EdmStructuredType)
AddUnidirectionalNavigation(EdmNavigationPropertyInfo)

Creates and adds a unidirectional navigation property to this type.

(Inherited from EdmStructuredType)
FindProperty(String)

Searches for a structural or navigation property with the given name in this type and all base types and returns null if no such property exists.

(Inherited from EdmStructuredType)
SetNavigationPropertyPartner(EdmNavigationProperty, IEdmPathExpression, EdmNavigationProperty, IEdmPathExpression)

Sets partner information of a top-level navigation property.

ToString()

Returns the text representation of the current object.

(Inherited from EdmType)

Extension Methods

IsEquivalentTo(IEdmType, IEdmType)

Returns true if the compared type is semantically equivalent to this type. Schema types (IEdmSchemaType) are compared by their object refs.

AsActualType(IEdmType)

Returns the actual type of the given type. If the given type is type definition, the actual type is its underlying type; otherwise, return the given type itself.

InheritsFrom(IEdmStructuredType, IEdmStructuredType)

Determines if the potential base type is in the inheritance hierarchy of the type being tested.

IsBinary(IEdmType)

Returns true if this definition refers to a binary type.

IsDecimal(IEdmType)

Returns true if this definition refers to a decimal type.

IsGeography(IEdmType)

Returns true if this definition refers to a geography type.

IsGeometry(IEdmType)

Returns true if this definition refers to a geometry type.

IsOnSameTypeHierarchyLineWith(IEdmType, IEdmType)

Determines whether thisType is the same as otherType, or thisType derives from otherType, or otherType derives from thisType.

IsOrInheritsFrom(IEdmType, IEdmType)

Determines if a type is equivalent to or derived from another type.

IsSpatial(IEdmType)

Returns true if this definition refers to a spatial type.

IsStream(IEdmType)

Returns true if this reference refers to a stream type.

IsString(IEdmType)

Returns true if this definition refers to a string type.

IsTemporal(IEdmType)

Returns true if this definition refers to a temporal type.

IsUntyped(IEdmType)

Returns true if this definition refers to an untyped type.

GetSymbolicString(IEdmVocabularyAnnotatable)

Gets the symbolic string of an annotated element. In the next breaking change, it's better to add a property into IEdmVocabularyAnnotatable.

AsElementType(IEdmType)

Gets the element type of a collection definition or itself of a non-collection definition referred to by the type reference.

BaseEntityType(IEdmEntityType)

Gets the base type of this entity type definition.

BaseType(IEdmStructuredType)

Gets the base type of this structured type definition.

DeclaredNavigationProperties(IEdmStructuredType)

Gets the navigation properties declared in this structured type definition.

DeclaredStructuralProperties(IEdmStructuredType)

Gets all structural properties declared in the IEdmStructuredTypeDefinition.

FullName(IEdmSchemaElement)

Gets the full name of the element.

FullTypeName(IEdmType)

Gets the full name of the definition referred to by the type reference.

HasDeclaredKeyProperty(IEdmEntityType, IEdmProperty)

Checks whether the given entity type has the property as one of the key properties.

IsOpen(IEdmType)

Returns true if the definition of this reference is open.

Key(IEdmEntityType)

Gets the declared key of the most defined entity with a declared key present.

Location(IEdmElement)

Gets the location of this element.

NavigationProperties(IEdmStructuredType)

Get the navigation properties declared in this structured type and all base types.

Properties(IEdmStructuredType)

Gets all properties of the structured type definition and its base types.

ShortQualifiedName(IEdmSchemaElement)

Gets the Short Qualified name of the element.

StructuralProperties(IEdmStructuredType)

Gets the structural properties declared in this type definition and all base types.

VocabularyAnnotations(IEdmVocabularyAnnotatable, IEdmModel)

Gets an annotatable element's vocabulary annotations as seen from a particular model.

ToTraceString(IEdmSchemaElement)

Returns the text representation of the current object.

ToTraceString(IEdmSchemaType)

Returns the text representation of the current object.

ToTraceString(IEdmType)

Returns the text representation of the current object.

Errors(IEdmElement)

Gets the errors, if any, that belong to this element or elements that this element contains. For example errors for a structural type include the errors of the type itself and errors of its declared properties. The method does not analyze elements referenced by this element. For example errors of a property do not include errors from its type.

IsBad(IEdmElement)

Returns true if this element contains errors returned by the Errors(IEdmElement) method.

Applies to