Share via


ODataModelBuilder.AddEntityType Method (Type)

 

Registers an entity type as part of the model and returns an object that can be used to configure the entity. This method can be called multiple times for the same entity to perform multiple lines of configuration.

Namespace:   System.Web.OData.Builder
Assembly:  System.Web.OData (in System.Web.OData.dll)

Syntax

public virtual EntityTypeConfiguration AddEntityType(
    Type type
)
public:
virtual EntityTypeConfiguration^ AddEntityType(
    Type^ type
)
abstract AddEntityType : 
        type:Type -> EntityTypeConfiguration
override AddEntityType : 
        type:Type -> EntityTypeConfiguration
Public Overridable Function AddEntityType (
    type As Type
) As EntityTypeConfiguration

Parameters

  • type
    Type: System.Type

    The type to be registered or configured.

Return Value

Type: System.Web.OData.Builder.EntityTypeConfiguration

The configuration object for the specified entity type.

See Also

ODataModelBuilder Class
System.Web.OData.Builder Namespace

Return to top