RelationalEntityTypeExtensions.GetDeclaredCheckConstraints 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
GetDeclaredCheckConstraints(IConventionEntityType) |
Returns all check constraints declared on the entity type. |
GetDeclaredCheckConstraints(IEntityType) |
Returns all check constraints declared on the entity type. |
GetDeclaredCheckConstraints(IMutableEntityType) |
Returns all check constraints declared on the entity type. |
GetDeclaredCheckConstraints(IReadOnlyEntityType) |
Returns all check constraints declared on the entity type. |
GetDeclaredCheckConstraints(IConventionEntityType)
Returns all check constraints declared on the entity type.
public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IConventionCheckConstraint> GetDeclaredCheckConstraints (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType);
static member GetDeclaredCheckConstraints : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType -> seq<Microsoft.EntityFrameworkCore.Metadata.IConventionCheckConstraint>
<Extension()>
Public Function GetDeclaredCheckConstraints (entityType As IConventionEntityType) As IEnumerable(Of IConventionCheckConstraint)
Parameters
- entityType
- IConventionEntityType
The entity type to get the check constraints for.
Returns
Remarks
This method does not return check constraints declared on base types. It is useful when iterating over all entity types to avoid processing the same check constraint more than once. Use GetCheckConstraints(IConventionEntityType) to also return check constraints declared on base types.
Applies to
GetDeclaredCheckConstraints(IEntityType)
Returns all check constraints declared on the entity type.
public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.ICheckConstraint> GetDeclaredCheckConstraints (this Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType);
static member GetDeclaredCheckConstraints : Microsoft.EntityFrameworkCore.Metadata.IEntityType -> seq<Microsoft.EntityFrameworkCore.Metadata.ICheckConstraint>
<Extension()>
Public Function GetDeclaredCheckConstraints (entityType As IEntityType) As IEnumerable(Of ICheckConstraint)
Parameters
- entityType
- IEntityType
The entity type to get the check constraints for.
Returns
Remarks
This method does not return check constraints declared on base types. It is useful when iterating over all entity types to avoid processing the same check constraint more than once. Use GetCheckConstraints(IEntityType) to also return check constraints declared on base types.
Applies to
GetDeclaredCheckConstraints(IMutableEntityType)
Returns all check constraints declared on the entity type.
public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IMutableCheckConstraint> GetDeclaredCheckConstraints (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType);
static member GetDeclaredCheckConstraints : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> seq<Microsoft.EntityFrameworkCore.Metadata.IMutableCheckConstraint>
<Extension()>
Public Function GetDeclaredCheckConstraints (entityType As IMutableEntityType) As IEnumerable(Of IMutableCheckConstraint)
Parameters
- entityType
- IMutableEntityType
The entity type to get the check constraints for.
Returns
Remarks
This method does not return check constraints declared on base types. It is useful when iterating over all entity types to avoid processing the same check constraint more than once. Use GetCheckConstraints(IMutableEntityType) to also return check constraints declared on base types.
Applies to
GetDeclaredCheckConstraints(IReadOnlyEntityType)
Returns all check constraints declared on the entity type.
public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyCheckConstraint> GetDeclaredCheckConstraints (this Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType entityType);
static member GetDeclaredCheckConstraints : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> seq<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyCheckConstraint>
<Extension()>
Public Function GetDeclaredCheckConstraints (entityType As IReadOnlyEntityType) As IEnumerable(Of IReadOnlyCheckConstraint)
Parameters
- entityType
- IReadOnlyEntityType
The entity type to get the check constraints for.
Returns
Remarks
This method does not return check constraints declared on base types. It is useful when iterating over all entity types to avoid processing the same check constraint more than once. Use GetCheckConstraints(IReadOnlyEntityType) to also return check constraints declared on base types.
Applies to
Entity Framework