ODataConventionModelBuilder Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
ODataConventionModelBuilder is used to automatically map CLR classes to an EDM model based on a set of.
public class ODataConventionModelBuilder : Microsoft.AspNet.OData.Builder.ODataModelBuilder
type ODataConventionModelBuilder = class
inherit ODataModelBuilder
Public Class ODataConventionModelBuilder
Inherits ODataModelBuilder
- Inheritance
Constructors
ODataConventionModelBuilder() |
Initializes a new instance of the ODataConventionModelBuilder class. |
ODataConventionModelBuilder(ApplicationPartManager) |
Initializes a new instance of the ODataConventionModelBuilder class. This constructor uses the ApplicationPartManager from AspNetCore to get a list of assemblies for modeling. |
ODataConventionModelBuilder(HttpConfiguration, Boolean) |
Initializes a new instance of the ODataConventionModelBuilder class. |
ODataConventionModelBuilder(HttpConfiguration) |
Initializes a new instance of the ODataConventionModelBuilder class. |
ODataConventionModelBuilder(IServiceProvider, Boolean) |
Initializes a new instance of the ODataConventionModelBuilder class.
This constructor uses the ApplicationPartManager from AspNetCore obtained
from the IServiceProvider to get a list of assemblies for modeling.
The model built if |
ODataConventionModelBuilder(IServiceProvider) |
Initializes a new instance of the ODataConventionModelBuilder class. This constructor uses the ApplicationPartManager from AspNetCore obtained from the IServiceProvider to get a list of assemblies for modeling. |
Properties
BindingOptions |
Gets or sets the navigation property binding options. (Inherited from ODataModelBuilder) |
ContainerName |
Gets or sets the name of the container that will hold all the navigation sources, actions and functions (Inherited from ODataModelBuilder) |
DataServiceVersion |
Gets or sets the data service version of the model. The default value is 4.0. (Inherited from ODataModelBuilder) |
EntitySets |
Gets the collection of EDM entity sets in the model to be built. (Inherited from ODataModelBuilder) |
EnumTypes |
Gets the collection of EDM types 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 4.0. (Inherited from ODataModelBuilder) |
ModelAliasingEnabled |
Gets or sets if model aliasing is enabled or not. The default value is true. |
Namespace |
Gets or sets the namespace that will be used for the resulting model (Inherited from ODataModelBuilder) |
NavigationSources |
Gets the collection of EDM navigation sources (entity sets and singletons) in the model to be built. (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. |
Operations |
Gets the collection of Operations (i.e. Actions, Functions and ServiceOperations) in the model to be built. (Inherited from ODataModelBuilder) |
Singletons |
Gets the collection of EDM singletons in the model to be built. (Inherited from ODataModelBuilder) |
StructuralTypes |
Gets the collection of EDM types in the model to be built. (Inherited from ODataModelBuilder) |
Methods
Action(String) |
Adds an unbound action to the builder. (Inherited from ODataModelBuilder) |
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. |
AddOperation(OperationConfiguration) |
Adds a operation to the model. (Inherited from ODataModelBuilder) |
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. (Inherited from ODataModelBuilder) |
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. (Inherited from ODataModelBuilder) |
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. (Inherited from ODataModelBuilder) |
EnumType<TEnumType>() |
Registers an enum type as part of the model and returns an object that can be used to configure the enum. (Inherited from ODataModelBuilder) |
Function(String) |
Adds an unbound function to the builder. (Inherited from ODataModelBuilder) |
GetEdmModel() |
Creates a IEdmModel based on the configuration performed using this builder. |
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. (Inherited from ODataModelBuilder) |
Ignore(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 from the model. This is used to remove types from the model that were added by convention during initial model discovery. |
RemoveEntitySet(String) |
Removes the entity set from the model. (Inherited from ODataModelBuilder) |
RemoveEnumType(Type) |
Removes the type from the model. (Inherited from ODataModelBuilder) |
RemoveOperation(OperationConfiguration) |
Remove the operation from the model (Inherited from ODataModelBuilder) |
RemoveOperation(String) |
Remove the operation from the model If there is more than one operation with the name specified this method will not work. You need to use the other RemoveOperation(..) overload instead. (Inherited from ODataModelBuilder) |
RemoveSingleton(String) |
Removes the singleton from the model. (Inherited from ODataModelBuilder) |
RemoveStructuralType(Type) |
Removes the type from the model. (Inherited from ODataModelBuilder) |
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. (Inherited from ODataModelBuilder) |
ValidateModel(IEdmModel) |
Validates the IEdmModel that is being created. |
Extension Methods
EnableLowerCamelCase(ODataConventionModelBuilder, NameResolverOptions) |
Enable lower camel case with given NameResolverOptions. |
EnableLowerCamelCase(ODataConventionModelBuilder) |
Enable lower camel case with default NameResolverOptions NameResolverOptions.ProcessReflectedPropertyNames | NameResolverOptions.ProcessDataMemberAttributePropertyNames | NameResolverOptions.ProcessExplicitPropertyNames. |