Interface IConventionCheckConstraint
- Namespace
- Microsoft.EntityFrameworkCore.Metadata
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Represents a check constraint on the entity type.
public interface IConventionCheckConstraint : IReadOnlyCheckConstraint, IReadOnlyAnnotatable, IConventionAnnotatable
- Inherited Members
Remarks
See Database check constraints for more information and examples.
Properties
Builder
Gets the builder that can be used to configure this check constraint.
IConventionCheckConstraintBuilder Builder { get; }
Property Value
Exceptions
- InvalidOperationException
If the check constraint has been removed from the model.
EntityType
Gets the entity type on which this check constraint is defined.
IConventionEntityType EntityType { get; }
Property Value
- IConventionEntityType
Methods
GetConfigurationSource()
Gets the configuration source for this check constraint.
ConfigurationSource GetConfigurationSource()
Returns
- ConfigurationSource
The configuration source for this check constraint.
GetNameConfigurationSource()
Gets the configuration source for the database name.
ConfigurationSource? GetNameConfigurationSource()
Returns
- ConfigurationSource?
The configuration source for the database name.
SetName(string?, bool)
Sets the name of the check constraint in the database.
string? SetName(string? name, bool fromDataAnnotation = false)
Parameters
name
stringThe name of the check constraint in the database.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- string
The configured value.