SqlServerModelBuilderExtensions.CanUseNamedDefaultConstraints 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.
Returns a value indicating whether named default constraints should be used in the model.
public static bool CanUseNamedDefaultConstraints(this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder modelBuilder, bool value, bool fromDataAnnotation = false);
static member CanUseNamedDefaultConstraints : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder * bool * bool -> bool
<Extension()>
Public Function CanUseNamedDefaultConstraints (modelBuilder As IConventionModelBuilder, value As Boolean, Optional fromDataAnnotation As Boolean = false) As Boolean
Parameters
- modelBuilder
- IConventionModelBuilder
The model builder.
- value
- Boolean
The value to use.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
true if the given value can be set as the configuration for named default constraints setting.
Remarks
See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.