Table of Contents

Class CheckConstraint

Namespace
Microsoft.EntityFrameworkCore.Metadata.Internal
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public class CheckConstraint : ConventionAnnotatable, IMutableCheckConstraint, IMutableAnnotatable, IConventionCheckConstraint, IConventionAnnotatable, ICheckConstraint, IReadOnlyCheckConstraint, IReadOnlyAnnotatable, IAnnotatable
Inheritance
CheckConstraint
Implements
IMutableAnnotatable
IConventionAnnotatable
IReadOnlyAnnotatable
IAnnotatable

Constructors

CheckConstraint(IMutableEntityType, string, string, ConfigurationSource)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public CheckConstraint(IMutableEntityType entityType, string name, string sql, ConfigurationSource configurationSource)

Parameters

entityType IMutableEntityType
name string
sql string
configurationSource ConfigurationSource

Properties

Builder

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual InternalCheckConstraintBuilder Builder { get; }

Property Value

InternalCheckConstraintBuilder

DebugView

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual DebugView DebugView { get; }

Property Value

DebugView

EntityType

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual IReadOnlyEntityType EntityType { get; }

Property Value

IReadOnlyEntityType

IsInModel

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual bool IsInModel { get; }

Property Value

bool

IsReadOnly

Indicates whether the check constraint is read-only.

public override bool IsReadOnly { get; }

Property Value

bool

ModelName

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual string ModelName { get; }

Property Value

string

Name

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual string? Name { get; set; }

Property Value

string

Sql

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual string Sql { get; }

Property Value

string

Methods

AreCompatible(IReadOnlyCheckConstraint, IReadOnlyCheckConstraint, in StoreObjectIdentifier, bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public static bool AreCompatible(IReadOnlyCheckConstraint checkConstraint, IReadOnlyCheckConstraint duplicateCheckConstraint, in StoreObjectIdentifier storeObject, bool shouldThrow)

Parameters

checkConstraint IReadOnlyCheckConstraint
duplicateCheckConstraint IReadOnlyCheckConstraint
storeObject StoreObjectIdentifier
shouldThrow bool

Returns

bool

Attach(IConventionEntityType, IConventionCheckConstraint)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public static void Attach(IConventionEntityType entityType, IConventionCheckConstraint detachedCheckConstraint)

Parameters

entityType IConventionEntityType
detachedCheckConstraint IConventionCheckConstraint

FindCheckConstraint(IReadOnlyEntityType, string)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public static IReadOnlyCheckConstraint? FindCheckConstraint(IReadOnlyEntityType entityType, string name)

Parameters

entityType IReadOnlyEntityType
name string

Returns

IReadOnlyCheckConstraint

FindDeclaredCheckConstraint(IReadOnlyEntityType, string)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public static IReadOnlyCheckConstraint? FindDeclaredCheckConstraint(IReadOnlyEntityType entityType, string name)

Parameters

entityType IReadOnlyEntityType
name string

Returns

IReadOnlyCheckConstraint

GetCheckConstraints(IReadOnlyEntityType)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public static IEnumerable<IReadOnlyCheckConstraint> GetCheckConstraints(IReadOnlyEntityType entityType)

Parameters

entityType IReadOnlyEntityType

Returns

IEnumerable<IReadOnlyCheckConstraint>

GetConfigurationSource()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual ConfigurationSource GetConfigurationSource()

Returns

ConfigurationSource

GetDeclaredCheckConstraints(IReadOnlyEntityType)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public static IEnumerable<IReadOnlyCheckConstraint> GetDeclaredCheckConstraints(IReadOnlyEntityType entityType)

Parameters

entityType IReadOnlyEntityType

Returns

IEnumerable<IReadOnlyCheckConstraint>

GetName(in StoreObjectIdentifier)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual string? GetName(in StoreObjectIdentifier storeObject)

Parameters

storeObject StoreObjectIdentifier

Returns

string

GetNameConfigurationSource()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual ConfigurationSource? GetNameConfigurationSource()

Returns

ConfigurationSource?

MergeInto(IConventionCheckConstraint, IConventionCheckConstraint)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public static void MergeInto(IConventionCheckConstraint detachedCheckConstraint, IConventionCheckConstraint existingCheckConstraint)

Parameters

detachedCheckConstraint IConventionCheckConstraint
existingCheckConstraint IConventionCheckConstraint

RemoveCheckConstraint(IMutableEntityType, string)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public static IMutableCheckConstraint? RemoveCheckConstraint(IMutableEntityType entityType, string name)

Parameters

entityType IMutableEntityType
name string

Returns

IMutableCheckConstraint

SetName(string?, ConfigurationSource?)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual string? SetName(string? name, ConfigurationSource? configurationSource)

Parameters

name string
configurationSource ConfigurationSource

Returns

string

SetRemovedFromModel()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void SetRemovedFromModel()

ToString()

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public override string ToString()

Returns

string

UpdateConfigurationSource(ConfigurationSource)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

public virtual void UpdateConfigurationSource(ConfigurationSource configurationSource)

Parameters

configurationSource ConfigurationSource