ODataModelBuilder Class
Represents a model builder that is used to map CLR classes to an EDM model.
Namespace: System.Web.OData.Builder
Assembly: System.Web.OData (in System.Web.OData.dll)
Inheritance Hierarchy
System.Object
System.Web.OData.Builder.ODataModelBuilder
System.Web.OData.Builder.ODataConventionModelBuilder
Syntax
public class ODataModelBuilder
public ref class ODataModelBuilder
type ODataModelBuilder = class end
Public Class ODataModelBuilder
Constructors
Name | Description | |
---|---|---|
ODataModelBuilder() | Initializes a new instance of the ODataModelBuilder class. |
Properties
Name | Description | |
---|---|---|
ContainerName | Gets or sets the name of the container that will hold all the navigation sources, actions and functions |
|
DataServiceVersion | Gets or sets the data service version of the model. The default value is 4.0. |
|
EntitySets | Gets the collection of EDM entity sets in the model to be built. |
|
EnumTypes | Gets the collection of EDM types in the model to be built. |
|
MaxDataServiceVersion | Gets or sets the maximum data service version of the model. The default value is 4.0. |
|
Namespace | Gets or sets the namespace that will be used for the resulting model |
|
NavigationSources | Gets the collection of EDM navigation sources (entity sets and singletons) in the model to be built. |
|
Procedures | Gets the collection of Procedures (i.e. Actions, Functions and ServiceOperations) in the model to be built. |
|
Singletons | Gets the collection of EDM singletons in the model to be built. |
|
StructuralTypes | Gets the collection of EDM types in the model to be built. |
Methods
Name | Description | |
---|---|---|
Action(String) | Adds an unbound action to the builder. |
|
AddComplexType(Type) | Registers an 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. |
|
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. |
|
AddEntityType(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. |
|
AddEnumType(Type) | Registers an enum type as part of the model and returns an object that can be used to configure the enum type. |
|
AddProcedure(ProcedureConfiguration) | Adds a procedure to the model. |
|
AddSingleton(String, EntityTypeConfiguration) | Registers a singleton as a part of the model and returns an object that can be used to configure the singleton. This method can be called multiple times for the same type to perform multiple lines of configuration. |
|
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. |
|
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. |
|
EntityType<TEntityType>() | Registers an entity type as part of the model and returns an object that can be used to configure the entity type. This method can be called multiple times for the same entity to perform multiple lines of configuration. |
|
EnumType<TEnumType>() | Registers an enum type as part of the model and returns an object that can be used to configure the enum. |
|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
Function(String) | Adds an unbound function to the builder. |
|
GetEdmModel() | Creates a IEdmModel based on the configuration performed using this builder. |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
GetTypeConfigurationOrNull(Type) | Attempts to find a pre-configured structural type or a primitive type or an enum type that matches the T. If no matches are found NULL is returned. |
|
MemberwiseClone() | (Inherited from Object.) |
|
RemoveEntitySet(String) | Removes the entity set from the model. |
|
RemoveEnumType(Type) | Removes the type from the model. |
|
RemoveProcedure(ProcedureConfiguration) | Remove the procedure from the model |
|
RemoveProcedure(String) | Remove the procedure from the model RemarksIf there is more than one procedure with the name specified this method will not work. You need to use the other RemoveProcedure(..) overload instead. |
|
RemoveSingleton(String) | Removes the singleton from the model. |
|
RemoveStructuralType(Type) | Removes the type from the model. |
|
Singleton<TEntityType>(String) | Registers a singleton as a part of the model and returns an object that can be used to configure the singleton. This method can be called multiple times for the same type to perform multiple lines of configuration. |
|
ToString() | (Inherited from Object.) |
|
ValidateModel(IEdmModel) | Validates the IEdmModel that is being created. |
Remarks
Gets the collection of EDM types in the model to be built.
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.OData.Builder Namespace
Return to top