ConventionModelExtensions 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.
Caution
Use IConventionModel
Extension methods for IConventionModel.
public static class ConventionModelExtensions
[System.Obsolete("Use IConventionModel")]
public static class ConventionModelExtensions
type ConventionModelExtensions = class
[<System.Obsolete("Use IConventionModel")>]
type ConventionModelExtensions = class
Public Module ConventionModelExtensions
- Inheritance
-
ConventionModelExtensions
- Attributes
Methods
AddIgnored(IConventionModel, Type, Boolean) |
Marks the given entity type as ignored. |
AddOwned(IConventionModel, Type, Boolean) |
Marks the given entity type as owned, indicating that when discovered entity types using the given type should be configured as owned. |
AddShared(IConventionModel, Type, Boolean) |
Marks the given entity type as shared, indicating that when discovered matching entity types should be configured as shared type entity type. |
FinalizeModel(IConventionModel) |
Forces post-processing on the model such that it is ready for use by the runtime. This post processing happens automatically when using OnModelCreating(ModelBuilder); this method allows it to be run explicitly in cases where the automatic execution is not possible. |
FindEntityType(IConventionModel, Type) |
Gets the entity that maps the given entity class. Returns |
FindEntityType(IConventionModel, Type, String, IConventionEntityType) |
Gets the entity type for the given name, defining navigation name
and the defining entity type. Returns |
FindIgnoredConfigurationSource(IConventionModel, Type) |
Indicates whether the given entity type is ignored. |
FindIsOwnedConfigurationSource(IConventionModel, Type) |
Returns a value indicating whether the entity types using the given type should be configured as owned types when discovered. |
FindLeastDerivedEntityTypes(IConventionModel, Type, Func<IConventionEntityType,Boolean>) |
Returns the entity types corresponding to the least derived types from the given. |
GetChangeTrackingStrategyConfigurationSource(IConventionModel) |
Returns the configuration source for GetChangeTrackingStrategy(IModel). |
GetEntityTypes(IConventionModel, String) |
Obsolete.
Gets the entity types matching the given name. |
GetEntityTypes(IConventionModel, Type) |
Obsolete.
Gets the entity types matching the given type. |
GetPropertyAccessModeConfigurationSource(IConventionModel) |
Returns the configuration source for GetPropertyAccessMode(IModel). |
IsIgnored(IConventionModel, String) |
Indicates whether the given entity type name is ignored. |
IsIgnored(IConventionModel, Type) |
Indicates whether the given entity type is ignored. |
IsOwned(IConventionModel, Type) |
Returns a value indicating whether the entity types using the given type should be configured as owned types when discovered. |
RemoveEntityType(IConventionModel, String) |
Removes an entity type without a defining navigation from the model. |
RemoveEntityType(IConventionModel, String, String, IConventionEntityType) |
Removes an entity type with a defining navigation from the model. |
RemoveEntityType(IConventionModel, Type) |
Removes an entity type from the model. |
RemoveEntityType(IConventionModel, Type, String, IConventionEntityType) |
Removes an entity type with a defining navigation from the model. |
RemoveOwned(IConventionModel, Type) |
Removes the given owned type, indicating that when discovered matching entity types should not be configured as owned. |
SetChangeTrackingStrategy(IConventionModel, Nullable<ChangeTrackingStrategy>, Boolean) |
Sets the default change tracking strategy to use for entities in the model. This strategy indicates how the context detects changes to properties for an instance of an entity type. |
SetPropertyAccessMode(IConventionModel, Nullable<PropertyAccessMode>, Boolean) |
Sets the PropertyAccessMode to use for properties of all entity types in this model. Note that individual entity types can override this access mode, and individual properties of entity types can override the access mode set on the entity type. The value set here will be used for any property for which no override has been specified. |
Applies to
Entity Framework