ODataModelBuilder Class

 

Represents a model builder that is used to map CLR classes to an EDM model.

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

Inheritance Hierarchy

System.Object
  System.Web.Http.OData.Builder.ODataModelBuilder
    System.Web.Http.OData.Builder.ODataConventionModelBuilder

Syntax

public class ODataModelBuilder
public ref class ODataModelBuilder 
type ODataModelBuilder = class end
Public Class ODataModelBuilder

Constructors

Name Description
System_CAPS_pubmethod ODataModelBuilder()

Initializes a new instance of the ODataModelBuilder class.

Properties

Name Description
System_CAPS_pubproperty ContainerName

Gets or sets the name of the container that will hold all the entity sets, actions and functions.

System_CAPS_pubproperty DataServiceVersion

Gets or sets the data service version of the model. The default value is 3.0.

System_CAPS_pubproperty EntitySets

Gets the collection of EDM entity sets in the model to be built.

System_CAPS_pubproperty MaxDataServiceVersion

Gets or sets the maximum data service version of the model. The default value is 3.0.

System_CAPS_pubproperty Namespace

Gets or sets the namespace that will be used for the resulting model.

System_CAPS_pubproperty Procedures

Gets the collection of procedures (such as actions, functions and service operations) in the model to be built

System_CAPS_pubproperty StructuralTypes

Gets the collection of EDM structural types in the model to be built.

Methods

Name Description
System_CAPS_pubmethod Action(String)

Adds a non-bindable action to the builder.

System_CAPS_pubmethod AddComplexType(Type)

Registers a complex 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.

System_CAPS_pubmethod AddEntity(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.

System_CAPS_pubmethod AddEntitySet(String, EntityTypeConfiguration)

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

System_CAPS_pubmethod AddProcedure(ProcedureConfiguration)

Adds a procedure to the model.

System_CAPS_pubmethod ComplexType<TComplexType>()

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

System_CAPS_pubmethod Entity<TEntityType>()

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.

System_CAPS_pubmethod EntitySet<TEntityType>(String)

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

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetEdmModel()

Creates and returns a IEdmModel based on the configuration performed using this builder.

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod GetTypeConfigurationOrNull(Type)

Attempts to find either a pre-configured structural type or a primitive type that matches the type. If no matches are found null is returned.

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod RemoveEntitySet(String)

Removes the entity set from the model.

System_CAPS_pubmethod RemoveProcedure(ProcedureConfiguration)

Removes the procedure from the model.

System_CAPS_pubmethod RemoveProcedure(String)

Removes the procedure from the model.

System_CAPS_pubmethod RemoveStructuralType(Type)

Removes the type from the model.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

System.Web.Http.OData.Builder Namespace

Return to top