ODataConventionModelBuilder Class
Used to automatically map CLR classes to an EDM model based on a set of IConvention.
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 ODataConventionModelBuilder _
Inherits ODataModelBuilder
'Usage
Dim instance As ODataConventionModelBuilder
public class ODataConventionModelBuilder : ODataModelBuilder
public ref class ODataConventionModelBuilder : public ODataModelBuilder
type ODataConventionModelBuilder =
class
inherit ODataModelBuilder
end
public class ODataConventionModelBuilder extends ODataModelBuilder
The ODataConventionModelBuilder type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ODataConventionModelBuilder() | Initializes a new ODataConventionModelBuilder. | |
ODataConventionModelBuilder(HttpConfiguration) | Initializes a new ODataConventionModelBuilder. | |
ODataConventionModelBuilder(HttpConfiguration, Boolean) | Initializes a new instance of the ODataConventionModelBuilder class. |
Top
Properties
Name | Description | |
---|---|---|
ContainerName | Gets or sets the name of the container that will hold all the entity sets, actions and functions. (Inherited from ODataModelBuilder.) | |
DataServiceVersion | Gets or sets the data service version of the model. The default value is 3.0. (Inherited from ODataModelBuilder.) | |
EntitySets | Gets the collection of EDM entity sets in the model to be built. (Inherited from ODataModelBuilder.) | |
MaxDataServiceVersion | Gets or sets the maximum data service version of the model. The default value is 3.0. (Inherited from ODataModelBuilder.) | |
Namespace | Gets or sets the namespace that will be used for the resulting model. (Inherited from ODataModelBuilder.) | |
OnModelCreating | This action is invoked after the ODataConventionModelBuilder has run all the conventions, but before the configuration is locked down and used to build the IEdmModel . | |
Procedures | Gets the collection of procedures (such as actions, functions and service operations) in the model to be built (Inherited from ODataModelBuilder.) | |
StructuralTypes | Gets the collection of EDM structural types in the model to be built. (Inherited from ODataModelBuilder.) |
Top
Methods
Name | Description | |
---|---|---|
Action | Adds a non-bindable action to the builder. (Inherited from ODataModelBuilder.) | |
AddComplexType | Registers a complex type as part of the model and returns an object that can be used to configure the entity. (Overrides ODataModelBuilder.AddComplexType(Type).) | |
AddEntity | Registers an entity type as part of the model and returns an object that can be used to configure the entity. (Overrides ODataModelBuilder.AddEntity(Type).) | |
AddEntitySet | Registers an entity set as a part of the model and returns an object that can be used to configure the entity set. (Overrides ODataModelBuilder.AddEntitySet(String, EntityTypeConfiguration).) | |
AddProcedure | Adds a procedure to the model. (Inherited from ODataModelBuilder.) | |
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. (Inherited from ODataModelBuilder.) | |
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. (Inherited from ODataModelBuilder.) | |
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. (Inherited from ODataModelBuilder.) | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetEdmModel | Creates an IEdmModel based on the configuration performed using this builder. (Overrides ODataModelBuilder.GetEdmModel().) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
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. (Inherited from ODataModelBuilder.) | |
Ignore(array<Type[]) | Excludes a type or types from the model. This is used to remove types from the model that were added by convention during initial model discovery. | |
Ignore<T>() | Excludes a type or types from the model. This is used to remove types from the model that were added by convention during initial model discovery. | |
MemberwiseClone | (Inherited from Object.) | |
RemoveEntitySet | Removes the entity set from the model. (Inherited from ODataModelBuilder.) | |
RemoveProcedure(String) | Removes the procedure from the model. (Inherited from ODataModelBuilder.) | |
RemoveProcedure(ProcedureConfiguration) | Removes the procedure from the model. (Inherited from ODataModelBuilder.) | |
RemoveStructuralType | Removes the type from the model. (Inherited from ODataModelBuilder.) | |
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.