Mutable​Model​Extensions Mutable​Model​Extensions Class

Definition

Extension methods for IMutableModel.

public static class MutableModelExtensionsPublic Module MutableModelExtensions
Inheritance
System.ObjectSystem.Object
MutableModelExtensionsMutableModelExtensions

Inherited Members

System.Object

System.Object.ToString()System.Object.ToString()
System.Object.Equals(System.Object)System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()System.Object.GetHashCode()
System.Object.GetType()System.Object.GetType()
System.Object.MemberwiseClone()System.Object.MemberwiseClone()

Methods

FindEntityType(IMutableModel, Type) FindEntityType(IMutableModel, Type)

Gets the entity that maps the given entity class. Returns null if no entity type with the given name is found.

public static IMutableEntityType FindEntityType(this IMutableModel model, Type type)<ExtensionAttribute>
Public Shared Function FindEntityType(model As IMutableModel, type As Type) As IMutableEntityType
Parameters
model
IMutableModel IMutableModel

The model to find the entity type in.

type
System.Type System.Type

The type of the entity class to find the type for.

Returns

The entity type, or null if none if found.

GetOrAddEntityType(IMutableModel, String) GetOrAddEntityType(IMutableModel, String)

Gets the entity type with the given name or adds a new entity type if none is found.

public static IMutableEntityType GetOrAddEntityType(this IMutableModel model, string name)<ExtensionAttribute>
Public Shared Function GetOrAddEntityType(model As IMutableModel, name As String) As IMutableEntityType
Parameters
model
IMutableModel IMutableModel

The model to find or add the entity type to.

name
System.String System.String

The name of the entity type.

Returns

The existing or newly created entity type.

GetOrAddEntityType(IMutableModel, Type) GetOrAddEntityType(IMutableModel, Type)

Gets the entity type with the given .NET type or adds a new entity type if none is found.

public static IMutableEntityType GetOrAddEntityType(this IMutableModel model, Type type)<ExtensionAttribute>
Public Shared Function GetOrAddEntityType(model As IMutableModel, type As Type) As IMutableEntityType
Parameters
model
IMutableModel IMutableModel

The model to find or add the entity type to.

type
System.Type System.Type

The .NET type of the entity type.

Returns

The existing or newly created entity type.

RemoveEntityType(IMutableModel, Type) RemoveEntityType(IMutableModel, Type)

Removes an entity type from the model.

public static IMutableEntityType RemoveEntityType(this IMutableModel model, Type type)<ExtensionAttribute>
Public Shared Function RemoveEntityType(model As IMutableModel, type As Type) As IMutableEntityType
Parameters
model
IMutableModel IMutableModel

The model to remove the entity type from.

type
System.Type System.Type

The entity type to be removed.

Returns

The entity type that was removed.

SetPropertyAccessMode(IMutableModel, Nullable<PropertyAccessMode>) SetPropertyAccessMode(IMutableModel, Nullable(Of PropertyAccessMode))

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.

public static void SetPropertyAccessMode(this IMutableModel model, PropertyAccessMode? propertyAccessMode)<ExtensionAttribute>
Public Shared Sub SetPropertyAccessMode(model As IMutableModel, propertyAccessMode As PropertyAccessMode?)
Parameters
model
IMutableModel IMutableModel

The model to set the access mode for.

propertyAccessMode
System.Nullable<PropertyAccessMode> System.Nullable(Of PropertyAccessMode)

The PropertyAccessMode, or null to clear the mode set.