Share via


ODataModelBuilder Class

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

Inheritance Hierarchy

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

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

Syntax

'Declaration
Public Class ODataModelBuilder
'Usage
Dim instance As ODataModelBuilder
public class ODataModelBuilder
public ref class ODataModelBuilder
type ODataModelBuilder =  class end
public class ODataModelBuilder

The ODataModelBuilder type exposes the following members.

Constructors

  Name Description
Public method ODataModelBuilder Initializes a new instance of the ODataModelBuilder class.

Top

Properties

  Name Description
Public property ContainerName Gets or sets the name of the container that will hold all the entity sets, actions and functions.
Public property DataServiceVersion Gets or sets the data service version of the model. The default value is 3.0.
Public property EntitySets Gets the collection of EDM entity sets in the model to be built.
Public property MaxDataServiceVersion Gets or sets the maximum data service version of the model. The default value is 3.0.
Public property Namespace Gets or sets the namespace that will be used for the resulting model.
Public property Procedures Gets the collection of procedures (such as actions, functions and service operations) in the model to be built
Public property StructuralTypes Gets the collection of EDM structural types in the model to be built.

Top

Methods

  Name Description
Public method Action Adds a non-bindable action to the builder.
Public method AddComplexType 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.
Public method AddEntity 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.
Public method AddEntitySet 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.
Public method AddProcedure Adds a procedure to the model.
Public method 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.
Public method 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.
Public method EntitySet<TEntityType> 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.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetEdmModel Creates and returns a IEdmModel based on the configuration performed using this builder.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method GetTypeConfigurationOrNull 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.
Protected method MemberwiseClone (Inherited from Object.)
Public method RemoveEntitySet Removes the entity set from the model.
Public method RemoveProcedure(String) Removes the procedure from the model.
Public method RemoveProcedure(ProcedureConfiguration) Removes the procedure from the model.
Public method RemoveStructuralType Removes the type from the model.
Public method ToString (Inherited from Object.)

Top

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

Reference

System.Web.Http.OData.Builder Namespace