Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

CheckConstraintBuilder.HasName(String) Method

Definition

Namespace:
Microsoft.EntityFrameworkCore.Metadata.Builders
Assembly:
Microsoft.EntityFrameworkCore.Relational.dll
Package:
Microsoft.EntityFrameworkCore.Relational v10.0.0
Package:
Microsoft.EntityFrameworkCore.Relational v6.0.0
Package:
Microsoft.EntityFrameworkCore.Relational v7.0.0
Package:
Microsoft.EntityFrameworkCore.Relational v8.0.0
Package:
Microsoft.EntityFrameworkCore.Relational v9.0.0
Source:
CheckConstraintBuilder.cs
Source:
CheckConstraintBuilder.cs
Source:
CheckConstraintBuilder.cs
Source:
CheckConstraintBuilder.cs
Source:
CheckConstraintBuilder.cs

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.

Sets the database name of the check constraint.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.CheckConstraintBuilder HasName(string name);
abstract member HasName : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.CheckConstraintBuilder
override this.HasName : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.CheckConstraintBuilder
Public Overridable Function HasName (name As String) As CheckConstraintBuilder

Parameters

name
String

The database name of the check constraint.

Returns

The same builder instance so that multiple configuration calls can be chained.

Remarks

See Database check constraints for more information and examples.

Applies to


Feedback

Was this page helpful?