SqlServerPropertyBuilderExtensions
SqlServerPropertyBuilderExtensions
Class
Definition
SQL Server specific extension methods for PropertyBuilder.
public static class SqlServerPropertyBuilderExtensions
Public Module SqlServerPropertyBuilderExtensions
- Inheritance
-
System.ObjectSystem.ObjectSqlServerPropertyBuilderExtensionsSqlServerPropertyBuilderExtensions
Methods
ForSqlServerHasColumnName(PropertyBuilder, String) ForSqlServerHasColumnName(PropertyBuilder, String)
Configures the column that the property maps to when targeting SQL Server.
public static PropertyBuilder ForSqlServerHasColumnName(this PropertyBuilder propertyBuilder, string name)
<ExtensionAttribute>
Public Shared Function ForSqlServerHasColumnName(propertyBuilder As PropertyBuilder, name As String) As PropertyBuilder
- propertyBuilder
- PropertyBuilder PropertyBuilder
The builder for the property being configured.
- name
- System.String System.String
The name of the column.
The same builder instance so that multiple calls can be chained.
ForSqlServerHasColumnName(PropertyBuilder, String)
ForSqlServerHasColumnName(Of TProperty)(PropertyBuilder(Of TProperty), String)
Configures the column that the property maps to when targeting SQL Server.
public static PropertyBuilder<TProperty> ForSqlServerHasColumnName<TProperty>(this PropertyBuilder<TProperty> propertyBuilder, string name)
<ExtensionAttribute>
Public Shared Function ForSqlServerHasColumnName(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty), name As String) As PropertyBuilder(Of TProperty)
- TProperty
The type of the property being configured.
- propertyBuilder
- PropertyBuilder<TProperty> PropertyBuilder(Of TProperty)
The builder for the property being configured.
- name
- System.String System.String
The name of the column.
The same builder instance so that multiple calls can be chained.
ForSqlServerHasColumnType(PropertyBuilder, String) ForSqlServerHasColumnType(PropertyBuilder, String)
Configures the data type of the column that the property maps to when targeting SQL Server. This should be the complete type name, including precision, scale, length, etc.
public static PropertyBuilder ForSqlServerHasColumnType(this PropertyBuilder propertyBuilder, string typeName)
<ExtensionAttribute>
Public Shared Function ForSqlServerHasColumnType(propertyBuilder As PropertyBuilder, typeName As String) As PropertyBuilder
- propertyBuilder
- PropertyBuilder PropertyBuilder
The builder for the property being configured.
- typeName
- System.String System.String
The name of the data type of the column.
The same builder instance so that multiple calls can be chained.
ForSqlServerHasColumnType(PropertyBuilder, String)
ForSqlServerHasColumnType(Of TProperty)(PropertyBuilder(Of TProperty), String)
Configures the data type of the column that the property maps to when targeting SQL Server. This should be the complete type name, including precision, scale, length, etc.
public static PropertyBuilder<TProperty> ForSqlServerHasColumnType<TProperty>(this PropertyBuilder<TProperty> propertyBuilder, string typeName)
<ExtensionAttribute>
Public Shared Function ForSqlServerHasColumnType(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty), typeName As String) As PropertyBuilder(Of TProperty)
- TProperty
The type of the property being configured.
- propertyBuilder
- PropertyBuilder<TProperty> PropertyBuilder(Of TProperty)
The builder for the property being configured.
- typeName
- System.String System.String
The name of the data type of the column.
The same builder instance so that multiple calls can be chained.
ForSqlServerHasComputedColumnSql(PropertyBuilder, String) ForSqlServerHasComputedColumnSql(PropertyBuilder, String)
Configures the property to map to a computed column when targeting SQL Server.
public static PropertyBuilder ForSqlServerHasComputedColumnSql(this PropertyBuilder propertyBuilder, string sql)
<ExtensionAttribute>
Public Shared Function ForSqlServerHasComputedColumnSql(propertyBuilder As PropertyBuilder, sql As String) As PropertyBuilder
- propertyBuilder
- PropertyBuilder PropertyBuilder
The builder for the property being configured.
- sql
- System.String System.String
The SQL expression that computes values for the column.
The same builder instance so that multiple calls can be chained.
ForSqlServerHasComputedColumnSql(PropertyBuilder, String)
ForSqlServerHasComputedColumnSql(Of TProperty)(PropertyBuilder(Of TProperty), String)
Configures the property to map to a computed column when targeting SQL Server.
public static PropertyBuilder<TProperty> ForSqlServerHasComputedColumnSql<TProperty>(this PropertyBuilder<TProperty> propertyBuilder, string sql)
<ExtensionAttribute>
Public Shared Function ForSqlServerHasComputedColumnSql(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty), sql As String) As PropertyBuilder(Of TProperty)
- TProperty
The type of the property being configured.
- propertyBuilder
- PropertyBuilder<TProperty> PropertyBuilder(Of TProperty)
The builder for the property being configured.
- sql
- System.String System.String
The SQL expression that computes values for the column.
The same builder instance so that multiple calls can be chained.
ForSqlServerHasDefaultValue(PropertyBuilder, Object) ForSqlServerHasDefaultValue(PropertyBuilder, Object)
Configures the default value for the column that the property maps to when targeting SQL Server.
public static PropertyBuilder ForSqlServerHasDefaultValue(this PropertyBuilder propertyBuilder, object value)
<ExtensionAttribute>
Public Shared Function ForSqlServerHasDefaultValue(propertyBuilder As PropertyBuilder, value As Object) As PropertyBuilder
- propertyBuilder
- PropertyBuilder PropertyBuilder
The builder for the property being configured.
- value
- System.Object System.Object
The default value of the column.
The same builder instance so that multiple calls can be chained.
ForSqlServerHasDefaultValue(PropertyBuilder, Object)
ForSqlServerHasDefaultValue(Of TProperty)(PropertyBuilder(Of TProperty), Object)
Configures the default value for the column that the property maps to when targeting SQL Server.
public static PropertyBuilder<TProperty> ForSqlServerHasDefaultValue<TProperty>(this PropertyBuilder<TProperty> propertyBuilder, object value)
<ExtensionAttribute>
Public Shared Function ForSqlServerHasDefaultValue(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty), value As Object) As PropertyBuilder(Of TProperty)
- TProperty
The type of the property being configured.
- propertyBuilder
- PropertyBuilder<TProperty> PropertyBuilder(Of TProperty)
The builder for the property being configured.
- value
- System.Object System.Object
The default value of the column.
The same builder instance so that multiple calls can be chained.
ForSqlServerHasDefaultValueSql(PropertyBuilder, String) ForSqlServerHasDefaultValueSql(PropertyBuilder, String)
Configures the default value expression for the column that the property maps to when targeting SQL Server.
public static PropertyBuilder ForSqlServerHasDefaultValueSql(this PropertyBuilder propertyBuilder, string sql)
<ExtensionAttribute>
Public Shared Function ForSqlServerHasDefaultValueSql(propertyBuilder As PropertyBuilder, sql As String) As PropertyBuilder
- propertyBuilder
- PropertyBuilder PropertyBuilder
The builder for the property being configured.
- sql
- System.String System.String
The SQL expression for the default value of the column.
The same builder instance so that multiple calls can be chained.
ForSqlServerHasDefaultValueSql(PropertyBuilder, String)
ForSqlServerHasDefaultValueSql(Of TProperty)(PropertyBuilder(Of TProperty), String)
Configures the default value expression for the column that the property maps to when targeting SQL Server.
public static PropertyBuilder<TProperty> ForSqlServerHasDefaultValueSql<TProperty>(this PropertyBuilder<TProperty> propertyBuilder, string sql)
<ExtensionAttribute>
Public Shared Function ForSqlServerHasDefaultValueSql(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty), sql As String) As PropertyBuilder(Of TProperty)
- TProperty
The type of the property being configured.
- propertyBuilder
- PropertyBuilder<TProperty> PropertyBuilder(Of TProperty)
The builder for the property being configured.
- sql
- System.String System.String
The SQL expression for the default value of the column.
The same builder instance so that multiple calls can be chained.
ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String) ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)
Configures the property to use a sequence-based hi-lo pattern to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.
public static PropertyBuilder ForSqlServerUseSequenceHiLo(this PropertyBuilder propertyBuilder, string name = null, string schema = null)
<ExtensionAttribute>
Public Shared Function ForSqlServerUseSequenceHiLo(propertyBuilder As PropertyBuilder, name As String = Nothing, schema As String = Nothing) As PropertyBuilder
- propertyBuilder
- PropertyBuilder PropertyBuilder
The builder for the property being configured.
- name
- System.String System.String
The name of the sequence.
- schema
- System.String System.String
The schema of the sequence.
The same builder instance so that multiple calls can be chained.
ForSqlServerUseSequenceHiLo(PropertyBuilder, String, String)
ForSqlServerUseSequenceHiLo(Of TProperty)(PropertyBuilder(Of TProperty), String, String)
Configures the property to use a sequence-based hi-lo pattern to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.
public static PropertyBuilder<TProperty> ForSqlServerUseSequenceHiLo<TProperty>(this PropertyBuilder<TProperty> propertyBuilder, string name = null, string schema = null)
<ExtensionAttribute>
Public Shared Function ForSqlServerUseSequenceHiLo(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty), name As String = Nothing, schema As String = Nothing) As PropertyBuilder(Of TProperty)
- TProperty
The type of the property being configured.
- propertyBuilder
- PropertyBuilder<TProperty> PropertyBuilder(Of TProperty)
The builder for the property being configured.
- name
- System.String System.String
The name of the sequence.
- schema
- System.String System.String
The schema of the sequence.
The same builder instance so that multiple calls can be chained.
UseSqlServerIdentityColumn(PropertyBuilder) UseSqlServerIdentityColumn(PropertyBuilder)
Configures the property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.
public static PropertyBuilder UseSqlServerIdentityColumn(this PropertyBuilder propertyBuilder)
<ExtensionAttribute>
Public Shared Function UseSqlServerIdentityColumn(propertyBuilder As PropertyBuilder) As PropertyBuilder
- propertyBuilder
- PropertyBuilder PropertyBuilder
The builder for the property being configured.
The same builder instance so that multiple calls can be chained.
UseSqlServerIdentityColumn(PropertyBuilder)
UseSqlServerIdentityColumn(Of TProperty)(PropertyBuilder(Of TProperty))
Configures the property to use the SQL Server IDENTITY feature to generate values for new entities, when targeting SQL Server. This method sets the property to be OnAdd.
public static PropertyBuilder<TProperty> UseSqlServerIdentityColumn<TProperty>(this PropertyBuilder<TProperty> propertyBuilder)
<ExtensionAttribute>
Public Shared Function UseSqlServerIdentityColumn(Of TProperty)(propertyBuilder As PropertyBuilder(Of TProperty)) As PropertyBuilder(Of TProperty)
- TProperty
The type of the property being configured.
- propertyBuilder
- PropertyBuilder<TProperty> PropertyBuilder(Of TProperty)
The builder for the property being configured.
The same builder instance so that multiple calls can be chained.