MutableEntityTypeExtensions Class

Definition

Caution

Use IMutableEntityType

Extension methods for IMutableEntityType.

public static class MutableEntityTypeExtensions
[System.Obsolete("Use IMutableEntityType")]
public static class MutableEntityTypeExtensions
type MutableEntityTypeExtensions = class
[<System.Obsolete("Use IMutableEntityType")>]
type MutableEntityTypeExtensions = class
Public Module MutableEntityTypeExtensions
Inheritance
MutableEntityTypeExtensions
Attributes

Methods

AddForeignKey(IMutableEntityType, IMutableProperty, IMutableKey, IMutableEntityType)

Adds a new relationship to this entity type.

AddIndex(IMutableEntityType, IMutableProperty)

Adds an index to this entity type.

AddIndexerProperty(IMutableEntityType, String, Type)

Adds a property backed up by an indexer to this entity type.

AddKey(IMutableEntityType, IMutableProperty)

Adds a new alternate key to this entity type.

AddProperty(IMutableEntityType, MemberInfo)

Adds a property to this entity type.

AddProperty(IMutableEntityType, PropertyInfo)

Adds a property to this entity.

AddProperty(IMutableEntityType, String)

Adds a property to this entity type.

AddProperty(IMutableEntityType, String, Type)

Adds a property to this entity type.

FindDeclaredForeignKeys(IMutableEntityType, IReadOnlyList<IProperty>)

Gets the foreign keys declared on the given IConventionEntityType using the given properties.

FindDeclaredNavigation(IMutableEntityType, String)

Gets a navigation property on the given entity type. Does not return navigation properties defined on a base type. Returns null if no navigation property is found.

FindDeclaredProperty(IMutableEntityType, String)

Finds a property declared on the type with the given name. Does not return properties defined on a base type.

FindDefiningNavigation(IMutableEntityType)
Obsolete.

Returns the defining navigation if one exists or null otherwise.

FindForeignKey(IMutableEntityType, IProperty, IKey, IEntityType)

Gets the foreign key for the given properties that points to a given primary or alternate key. Returns null if no foreign key is found.

FindForeignKeys(IMutableEntityType, IProperty)

Gets the foreign keys defined on the given property. Only foreign keys that are defined on exactly the specified property are returned. Composite foreign keys that include the specified property are not returned.

FindForeignKeys(IMutableEntityType, IReadOnlyList<IProperty>)

Gets the foreign keys defined on the given properties. Only foreign keys that are defined on exactly the specified set of properties are returned.

FindIndex(IMutableEntityType, IProperty)

Gets the index defined on the given property. Returns null if no index is defined.

FindKey(IMutableEntityType, IProperty)

Gets the primary or alternate key that is defined on the given property. Returns null if no key is defined for the given property.

FindNavigation(IMutableEntityType, MemberInfo)

Gets a navigation property on the given entity type. Returns null if no navigation property is found.

FindNavigation(IMutableEntityType, PropertyInfo)

Gets a navigation property on the given entity type. Returns null if no navigation property is found.

FindNavigation(IMutableEntityType, String)

Gets a navigation property on the given entity type. Returns null if no navigation property is found.

FindOwnership(IMutableEntityType)

Returns the relationship to the owner if this is an owned type or null otherwise.

FindProperties(IMutableEntityType, IReadOnlyList<String>)

Finds matching properties on the given entity type. Returns null if any property is not found.

This API only finds scalar properties and does not find navigation properties.

FindProperty(IMutableEntityType, PropertyInfo)

Gets a property on the given entity type. Returns null if no property is found.

This API only finds scalar properties and does not find navigation properties. Use FindNavigation(IMutableEntityType, MemberInfo) to find a navigation property.

GetAllBaseTypes(IMutableEntityType)

Gets all types in the model from which a given entity type derives, starting with the root.

GetAllBaseTypesAscending(IMutableEntityType)

Gets all types in the model from which a given entity type derives, starting with the closest one.

GetDeclaredForeignKeys(IMutableEntityType)

Gets all foreign keys declared on the given IMutableEntityType.

This method does not return foreign keys declared on base types. It is useful when iterating over all entity types to avoid processing the same foreign key more than once. Use GetForeignKeys() to also return foreign keys declared on base types.

GetDeclaredIndexes(IMutableEntityType)

Gets all indexes declared on the given IMutableEntityType.

This method does not return indexes declared on base types. It is useful when iterating over all entity types to avoid processing the same index more than once. Use GetForeignKeys() to also return indexes declared on base types.

GetDeclaredKeys(IMutableEntityType)

Gets all keys declared on the given IEntityType.

This method does not return keys declared on base types. It is useful when iterating over all entity types to avoid processing the same key more than once. Use GetKeys() to also return keys declared on base types.

GetDeclaredNavigations(IMutableEntityType)

Gets all navigation properties declared on the given IMutableEntityType.

This method does not return navigation properties declared on base types. It is useful when iterating over all entity types to avoid processing the same navigation property more than once. Use GetNavigations(IMutableEntityType) to also return navigation properties declared on base types.

GetDeclaredProperties(IMutableEntityType)

Gets all non-navigation properties declared on the given IMutableEntityType.

This method does not return properties declared on base types. It is useful when iterating over all entity types to avoid processing the same property more than once. Use GetProperties() to also return properties declared on base types.

GetDeclaredReferencingForeignKeys(IMutableEntityType)

Gets all foreign keys that target a given entity type (i.e. foreign keys where the given entity type is the principal).

GetDeclaredServiceProperties(IMutableEntityType)

Gets all service properties declared on the given IMutableEntityType.

This method does not return properties declared on base types. It is useful when iterating over all entity types to avoid processing the same property more than once. Use GetServiceProperties() to also return properties declared on base types.

GetDerivedForeignKeys(IMutableEntityType)

Gets all foreign keys declared on the types derived from the given IMutableEntityType.

This method does not return foreign keys declared on the given entity type itself. Use GetForeignKeys() to return foreign keys declared on this and base entity typed types.

GetDerivedTypes(IMutableEntityType)

Gets all types in the model that derive from a given entity type.

GetDerivedTypesInclusive(IMutableEntityType)

Returns all derived types of the given IMutableEntityType, including the type itself.

GetDirectlyDerivedTypes(IMutableEntityType)

Gets all types in the model that directly derive from a given entity type.

GetDiscriminatorProperty(IMutableEntityType)

Returns the IMutableProperty that will be used for storing a discriminator value.

GetNavigations(IMutableEntityType)

Gets all navigation properties on the given entity type.

GetOrAddForeignKey(IMutableEntityType, IMutableProperty, IMutableKey, IMutableEntityType)

Gets an existing relationship, or creates a new one if one is not already defined.

GetOrAddForeignKey(IMutableEntityType, IReadOnlyList<IMutableProperty>, IMutableKey, IMutableEntityType)

Gets an existing relationship, or creates a new one if one is not already defined.

GetOrAddIndex(IMutableEntityType, IMutableProperty)

Gets the index defined on the given property or creates a new one if one is not already defined.

GetOrAddIndex(IMutableEntityType, IReadOnlyList<IMutableProperty>)

Gets the index defined on the given property or creates a new one if one is not already defined.

GetOrAddKey(IMutableEntityType, IMutableProperty)

Gets the existing alternate key defined on a property, or creates a new one if one is not already defined.

GetOrAddKey(IMutableEntityType, IReadOnlyList<IMutableProperty>)

Gets the existing alternate key defined on a set of properties, or creates a new one if one is not already defined.

GetOrAddProperty(IMutableEntityType, PropertyInfo)

Gets the property with the given name, or creates a new one if one is not already defined.

GetOrAddProperty(IMutableEntityType, String, Type)

Gets the property with the given name, or creates a new one if one is not already defined.

GetOrAddProperty(IMutableEntityType, String, Type, Boolean)

Gets the property with the given name, or creates a new one if one is not already defined.

GetOrSetPrimaryKey(IMutableEntityType, IMutableProperty)

Gets the existing primary key of an entity, or sets it if one is not defined.

GetOrSetPrimaryKey(IMutableEntityType, IReadOnlyList<IMutableProperty>)

Gets the existing primary key of an entity, or sets it if one is not defined.

GetReferencingForeignKeys(IMutableEntityType)

Gets all foreign keys that target a given entity type (i.e. foreign keys where the given entity type or a type it's derived from is the principal).

GetRootType(IMutableEntityType)

Gets the root base type for a given entity type.

RemoveDiscriminatorValue(IMutableEntityType)

Removes the discriminator value for this entity type.

RemoveForeignKey(IMutableEntityType, IReadOnlyList<IMutableProperty>, IMutableKey, IMutableEntityType)

Removes a foreign key from this entity type.

RemoveIndex(IMutableEntityType, IReadOnlyList<IMutableProperty>)

Removes an index from this entity type.

RemoveKey(IMutableEntityType, IReadOnlyList<IMutableProperty>)

Removes a primary or alternate key from this entity type.

RemoveProperty(IMutableEntityType, String)

Removes a property from this entity type.

RootType(IMutableEntityType)
Obsolete.

Gets the root base type for a given entity type.

SetChangeTrackingStrategy(IMutableEntityType, ChangeTrackingStrategy)

Sets the change tracking strategy to use for this entity type. This strategy indicates how the context detects changes to properties for an instance of the entity type.

SetChangeTrackingStrategy(IMutableEntityType, Nullable<ChangeTrackingStrategy>)

Sets the change tracking strategy to use for this entity type. This strategy indicates how the context detects changes to properties for an instance of the entity type.

SetDefiningQuery(IMutableEntityType, LambdaExpression)
Obsolete.

Sets the LINQ query used as the default source for queries of this type.

SetDiscriminatorMappingComplete(IMutableEntityType, Nullable<Boolean>)

Sets the value indicating whether the discriminator mapping is complete.

SetDiscriminatorProperty(IMutableEntityType, IProperty)

Sets the IProperty that will be used for storing a discriminator value.

SetDiscriminatorValue(IMutableEntityType, Object)

Sets the discriminator value for this entity type.

SetNavigationAccessMode(IMutableEntityType, Nullable<PropertyAccessMode>)

Sets the PropertyAccessMode to use for navigations of this entity type.

Note that individual navigations can override this access mode. The value set here will be used for any navigation for which no override has been specified.

SetPrimaryKey(IMutableEntityType, IMutableProperty)

Sets the primary key for this entity type.

SetPropertyAccessMode(IMutableEntityType, Nullable<PropertyAccessMode>)

Sets the PropertyAccessMode to use for properties of this entity type.

Note that individual properties can override this access mode. The value set here will be used for any property for which no override has been specified.

SetPropertyAccessMode(IMutableEntityType, Nullable<PropertyAccessMode>)

Sets the PropertyAccessMode to use for properties and navigations of this entity type.

Note that individual properties and navigations can override this access mode. The value set here will be used for any property or navigation for which no override has been specified.

SetQueryFilter(IMutableEntityType, LambdaExpression)

Sets the LINQ expression filter automatically applied to queries for this entity type.

Applies to