OwnedNavigationTableBuilder.HasCheckConstraint(String, String) 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.
Configures a database check constraint when targeting a relational database.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.CheckConstraintBuilder HasCheckConstraint (string name, string? sql);
abstract member HasCheckConstraint : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.CheckConstraintBuilder
override this.HasCheckConstraint : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.CheckConstraintBuilder
Public Overridable Function HasCheckConstraint (name As String, sql As String) As CheckConstraintBuilder
Parameters
- name
- String
The name of the check constraint.
- sql
- String
The logical constraint sql used in the check constraint.
Returns
A builder to configure the check constraint.
Remarks
See Database check constraints for more information and examples.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework