Share via


RelationalPropertyAnnotations Class

Definition

Properties for relational-specific annotations accessed through Relational(IMutableProperty).

public class RelationalPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalPropertyAnnotations
type RelationalPropertyAnnotations = class
    interface IRelationalPropertyAnnotations
Public Class RelationalPropertyAnnotations
Implements IRelationalPropertyAnnotations
Inheritance
RelationalPropertyAnnotations
Derived
Implements

Constructors

RelationalPropertyAnnotations(IProperty, RelationalFullAnnotationNames)
RelationalPropertyAnnotations(IProperty)

Constructs an instance for annotations of the given IProperty.

RelationalPropertyAnnotations(RelationalAnnotations, RelationalFullAnnotationNames)
RelationalPropertyAnnotations(RelationalAnnotations)

Constructs an instance for annotations of the IProperty represented by the given annotation helper.

Fields

ProviderFullAnnotationNames

Properties

Annotations

The RelationalAnnotations helper representing the IProperty to annotate.

ColumnName

The name of the column to which the property is mapped.

ColumnType

The database type of the column to which the property is mapped.

ComputedColumnSql

The computed constraint SQL expression that should be used when creating a column for this property.

DefaultValue

The default value to use in the definition of the column when creating a column for this property.

DefaultValueSql

The default constraint SQL expression that should be used when creating a column for this property.

IsFixedLength

A flag indicating if the property as capable of storing only fixed-length data, such as strings.

Property

The IProperty to annotate.

ShouldThrowOnConflict

Indicates whether or not an exception should be thrown if conflicting configuration is set. This is typically overridden when building using a fluent API to implement last call wins semantics.

ShouldThrowOnInvalidConfiguration

Indicates whether or not an exception should be thrown if invalid configuration is set.

Methods

CanSetComputedColumnSql(String)

Determines whether or not ComputedColumnSql can be set without conflict.

This method may throw if ShouldThrowOnConflict returns true.

CanSetDefaultValue(Object)

Determines whether or not DefaultValue can be set without conflict.

This method may throw if ShouldThrowOnConflict returns true.

CanSetDefaultValueSql(String)

Determines whether or not DefaultValueSql can be set without conflict.

This method may throw if ShouldThrowOnConflict returns true.

ClearAllServerGeneratedValues()

Clears any values set for DefaultValue, DefaultValueSql, and ComputedColumnSql.

GetAnnotations(IEntityType)

Gets a RelationalEntityTypeAnnotations instance for the given IEntityType maintaining the RelationalAnnotations semantics being used by this instance to control setting annotations by convention.

GetAnnotations(IProperty)

Gets a RelationalPropertyAnnotations instance for the given IProperty maintaining the RelationalAnnotations semantics being used by this instance to control setting annotations by convention.

GetComputedColumnSql(Boolean)

Gets the computed constraint SQL expression that should be used when creating a column for this property.

GetDefaultValue(Boolean)

Gets the default value to use in the definition of the column when creating a column for this property.

GetDefaultValueSql(Boolean)

Gets the default constraint SQL expression that should be used when creating a column for this property.

SetColumnName(String)

Attempts to set the ColumnName using the semantics of the RelationalAnnotations in use.

SetColumnType(String)

Attempts to set the ColumnType using the semantics of the RelationalAnnotations in use.

SetComputedColumnSql(String)

Attempts to set the ComputedColumnSql using the semantics of the RelationalAnnotations in use.

SetDefaultValue(Object)

Attempts to set the DefaultValue using the semantics of the RelationalAnnotations in use.

SetDefaultValueSql(String)

Attempts to set the DefaultValueSql using the semantics of the RelationalAnnotations in use.

SetFixedLength(Boolean)

Configures the property as capable of storing only fixed-length data, such as strings.

Applies to