MutableEntityTypeExtensions.GetOrAddIndex Method
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.
Overloads
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. |
GetOrAddIndex(IMutableEntityType, IMutableProperty)
Gets the index defined on the given property or creates a new one if one is not already defined.
public static Microsoft.EntityFrameworkCore.Metadata.IMutableIndex GetOrAddIndex (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property);
static member GetOrAddIndex : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * Microsoft.EntityFrameworkCore.Metadata.IMutableProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableIndex
<Extension()>
Public Function GetOrAddIndex (entityType As IMutableEntityType, property As IMutableProperty) As IMutableIndex
Parameters
- entityType
- IMutableEntityType
The entity type to get or add the index to.
- property
- IMutableProperty
The property to be indexed.
Returns
The existing or newly created index.
Applies to
GetOrAddIndex(IMutableEntityType, IReadOnlyList<IMutableProperty>)
Gets the index defined on the given property or creates a new one if one is not already defined.
public static Microsoft.EntityFrameworkCore.Metadata.IMutableIndex GetOrAddIndex (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> properties);
static member GetOrAddIndex : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> -> Microsoft.EntityFrameworkCore.Metadata.IMutableIndex
<Extension()>
Public Function GetOrAddIndex (entityType As IMutableEntityType, properties As IReadOnlyList(Of IMutableProperty)) As IMutableIndex
Parameters
- entityType
- IMutableEntityType
The entity type to get or add the index to.
- properties
- IReadOnlyList<IMutableProperty>
The properties to be indexed.
Returns
The existing or newly created index.
Applies to
Entity Framework