Class UniqueConstraintExtensions
- Namespace
- Microsoft.EntityFrameworkCore.Metadata
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Extension methods for IUniqueConstraint.
public static class UniqueConstraintExtensions
- Inheritance
-
UniqueConstraintExtensions
- Inherited Members
Methods
GetIsPrimaryKey(IUniqueConstraint)
Gets a value indicating whether this constraint is the primary key.
public static bool GetIsPrimaryKey(this IUniqueConstraint uniqueConstraint)
Parameters
uniqueConstraint
IUniqueConstraintThe metadata item.
Returns
ToDebugString(IUniqueConstraint, MetadataDebugStringOptions, int)
Creates a human-readable representation of the given metadata.
Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.
public static string ToDebugString(this IUniqueConstraint uniqueConstraint, MetadataDebugStringOptions options, int indent = 0)
Parameters
uniqueConstraint
IUniqueConstraintThe metadata item.
options
MetadataDebugStringOptionsOptions for generating the string.
indent
intThe number of indent spaces to use before each new line.
Returns
- string
A human-readable representation.