TypeMappingConfigurationBuilder 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.
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.
public class TypeMappingConfigurationBuilder
type TypeMappingConfigurationBuilder = class
Public Class TypeMappingConfigurationBuilder
- Inheritance
-
TypeMappingConfigurationBuilder
- Derived
Remarks
See Modeling entity types and relationships for more information.
Constructors
| TypeMappingConfigurationBuilder(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. |
Methods
| HasAnnotation(String, Object) |
Adds or updates an annotation on the property. |
| HasConversion(Type) |
Configures the property so that the property value is converted before writing to the database and converted back when reading from the database. |
| HasConversion<TConversion>() |
Configures the property so that the property value is converted before writing to the database and converted back when reading from the database. |
| HasMaxLength(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). |
| HasPrecision(Int32) |
Configures the precision of the property. |
| HasPrecision(Int32, Int32) |
Configures the precision and scale of the property. |
| IsUnicode(Boolean) |
Configures whether the property as capable of persisting unicode characters. Can only be set on String properties. |
Extension Methods
| HasColumnType(TypeMappingConfigurationBuilder, String) |
Configures the data type of the column that the scalar maps to when targeting a relational database. This should be the complete type name, including precision, scale, length, etc. |
| IsFixedLength(TypeMappingConfigurationBuilder, Boolean) |
Configures the scalar as capable of storing only fixed-length data, such as strings. |
Applies to
Feedback
Submit and view feedback for