SqlServerPropertyAnnotations Class

Definition

Properties for SQL Server-specific annotations accessed through SqlServer(IMutableProperty).

public class SqlServerPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations, Microsoft.EntityFrameworkCore.Metadata.ISqlServerPropertyAnnotations
type SqlServerPropertyAnnotations = class
    inherit RelationalPropertyAnnotations
    interface ISqlServerPropertyAnnotations
    interface IRelationalPropertyAnnotations
Public Class SqlServerPropertyAnnotations
Inherits RelationalPropertyAnnotations
Implements ISqlServerPropertyAnnotations
Inheritance
SqlServerPropertyAnnotations
Implements

Constructors

SqlServerPropertyAnnotations(IProperty)

Constructs an instance for annotations of the given IProperty.

SqlServerPropertyAnnotations(RelationalAnnotations)

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

Fields

ProviderFullAnnotationNames (Inherited from RelationalPropertyAnnotations)

Properties

Annotations

The RelationalAnnotations helper representing the IProperty to annotate.

(Inherited from RelationalPropertyAnnotations)
ColumnName

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

(Inherited from RelationalPropertyAnnotations)
ColumnType

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

(Inherited from RelationalPropertyAnnotations)
ComputedColumnSql

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

(Inherited from RelationalPropertyAnnotations)
DefaultValue

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

(Inherited from RelationalPropertyAnnotations)
DefaultValueSql

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

(Inherited from RelationalPropertyAnnotations)
HiLoSequenceName

Gets or sets the sequence name to use with ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)

HiLoSequenceSchema

Gets or sets the schema for the sequence to use with ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)

IsFixedLength

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

(Inherited from RelationalPropertyAnnotations)
Property

The IProperty to annotate.

(Inherited from RelationalPropertyAnnotations)
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.

(Inherited from RelationalPropertyAnnotations)
ShouldThrowOnInvalidConfiguration

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

(Inherited from RelationalPropertyAnnotations)
ValueGenerationStrategy

Gets or sets the SqlServerValueGenerationStrategy to use for the property.

If no strategy is set for the property, then the strategy to use will be taken from the IModel

Methods

CanSetComputedColumnSql(String)

Checks whether or not it is valid to set a computed SQL expression for the property.

CanSetDefaultValue(Object)

Checks whether or not it is valid to set a default value for the property.

CanSetDefaultValueSql(String)

Checks whether or not it is valid to set a default SQL expression for the property.

CanSetValueGenerationStrategy(Nullable<SqlServerValueGenerationStrategy>)

Checks whether or not it is valid to set the given SqlServerValueGenerationStrategy for the property.

ClearAllServerGeneratedValues()

Resets value-generation for the property to defaults.

FindHiLoSequence()

Finds the ISequence in the model to use with ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)

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.

(Inherited from RelationalPropertyAnnotations)
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.

(Inherited from RelationalPropertyAnnotations)
GetComputedColumnSql(Boolean)

Gets the computed SQL expression set for the property.

GetDefaultValue(Boolean)

Gets the default value set for the property.

GetDefaultValueSql(Boolean)

Gets the default SQL expression set for the property.

GetSqlServerValueGenerationStrategy(Boolean)

Gets or sets the SqlServerValueGenerationStrategy to use for the property.

SetColumnName(String)

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

(Inherited from RelationalPropertyAnnotations)
SetColumnType(String)

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

(Inherited from RelationalPropertyAnnotations)
SetComputedColumnSql(String)

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

(Inherited from RelationalPropertyAnnotations)
SetDefaultValue(Object)

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

(Inherited from RelationalPropertyAnnotations)
SetDefaultValueSql(String)

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

(Inherited from RelationalPropertyAnnotations)
SetFixedLength(Boolean)

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

(Inherited from RelationalPropertyAnnotations)
SetHiLoSequenceName(String)

Sets the sequence name to use with ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String).

SetHiLoSequenceSchema(String)

Sets the schema for the sequence to use with ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String).

SetValueGenerationStrategy(Nullable<SqlServerValueGenerationStrategy>)

Sets the SqlServerValueGenerationStrategy to use for the property.

Applies to