PropertiesConfigurationBuilder<TProperty> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a simple API surface for setting property defaults before conventions run.
public class PropertiesConfigurationBuilder<TProperty> : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertiesConfigurationBuilder
type PropertiesConfigurationBuilder<'Property> = class
inherit PropertiesConfigurationBuilder
Public Class PropertiesConfigurationBuilder(Of TProperty)
Inherits PropertiesConfigurationBuilder
Type Parameters
- TProperty
- Inheritance
Remarks
Instances of this class are returned from methods when using the ModelConfigurationBuilder API and it is not designed to be directly constructed in your application code.
Constructors
PropertiesConfigurationBuilder<TProperty>(PropertyConfiguration) |
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. |
Properties
Configuration |
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. (Inherited from PropertiesConfigurationBuilder) |
Methods
AreUnicode(Boolean) |
Configures the property as capable of persisting unicode characters. Can only be set on String properties. |
HaveAnnotation(String, Object) |
Adds or updates an annotation on the property. If an annotation with the key specified in
|
HaveConversion(Type, Type, Type) |
Configures the property so that the property value is converted before writing to the database and converted back when reading from the database. (Inherited from PropertiesConfigurationBuilder) |
HaveConversion(Type, Type) |
Configures the property so that the property value is converted before writing to the database and converted back when reading from the database. |
HaveConversion(Type) |
Configures the property so that the property value is converted before writing to the database and converted back when reading from the database. |
HaveConversion<TConversion,TComparer,TProviderComparer>() |
Configures the property so that the property value is converted before writing to the database and converted back when reading from the database. (Inherited from PropertiesConfigurationBuilder) |
HaveConversion<TConversion,TComparer>() |
Configures the property so that the property value is converted before writing to the database and converted back when reading from the database. |
HaveConversion<TConversion>() |
Configures the property so that the property value is converted before writing to the database and converted back when reading from the database. |
HaveMaxLength(Int32) |
Configures the maximum length of data that can be stored in this property. Maximum length can only be set on array properties (including String properties). |
HavePrecision(Int32, Int32) |
Configures the precision and scale of the property. |
HavePrecision(Int32) |
Configures the precision of the property. |
HaveSentinel(Object) |
Configures the value that will be used to determine if the property has been set or not. If the property is set to the sentinel value, then it is considered not set. By default, the sentinel value is the CLR default value for the type of the property. (Inherited from PropertiesConfigurationBuilder) |
Extension Methods
AreFixedLength(PropertiesConfigurationBuilder, Boolean) |
Configures the property as capable of storing only fixed-length data, such as strings. |
AreFixedLength<TProperty>(PropertiesConfigurationBuilder<TProperty>, Boolean) |
Configures the property as capable of storing only fixed-length data, such as strings. |
HaveColumnType(PropertiesConfigurationBuilder, String) |
Configures the data type of the column that the property maps to when targeting a relational database. This should be the complete type name, including precision, scale, length, etc. |
HaveColumnType<TProperty>(PropertiesConfigurationBuilder<TProperty>, String) |
Configures the data type of the column that the property maps to when targeting a relational database. This should be the complete type name, including precision, scale, length, etc. |
UseCollation(PropertiesConfigurationBuilder, String) |
Configures the property to use the given collation. The database column will be created with the given collation, and it will be used implicitly in all collation-sensitive operations. |
UseCollation<TProperty>(PropertiesConfigurationBuilder<TProperty>, String) |
Configures the property to use the given collation. The database column will be created with the given collation, and it will be used implicitly in all collation-sensitive operations. |