StringTypeMapping 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.
Represents the mapping between a .NET String type and a database type.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public class StringTypeMapping : Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
type StringTypeMapping = class
inherit RelationalTypeMapping
Public Class StringTypeMapping
Inherits RelationalTypeMapping
- Inheritance
- Inheritance
Remarks
See Implementation of database providers and extensions for more information and examples.
Constructors
StringTypeMapping(RelationalTypeMapping+RelationalTypeMappingParameters) |
Initializes a new instance of the StringTypeMapping class. |
StringTypeMapping(String, Nullable<DbType>, Boolean, Nullable<Int32>) |
Initializes a new instance of the StringTypeMapping class. |
Properties
ClrType |
Gets the .NET type. (Inherited from RelationalTypeMapping) |
Comparer |
A ValueComparer adds custom value snapshotting and comparison for CLR types that cannot be compared with Equals(Object, Object) and/or need a deep copy when taking a snapshot. (Inherited from CoreTypeMapping) |
Converter |
Converts types to and from the store whenever this mapping is used. May be null if no conversion is needed. (Inherited from CoreTypeMapping) |
DbType |
Gets the DbType to be used. (Inherited from RelationalTypeMapping) |
Default |
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. |
ElementTypeMapping |
If this type mapping represents a primitive collection, this holds the element's type mapping. (Inherited from CoreTypeMapping) |
HasNonDefaultSize |
Gets a value indicating whether the size setting has been manually configured to a non-default value. (Inherited from RelationalTypeMapping) |
HasNonDefaultUnicode |
Gets a value indicating whether the Unicode setting has been manually configured to a non-default value. (Inherited from RelationalTypeMapping) |
IsFixedLength |
Gets a value indicating whether the type is constrained to fixed-length data. (Inherited from RelationalTypeMapping) |
IsUnicode |
Gets a value indicating whether the type should handle Unicode data or not. (Inherited from RelationalTypeMapping) |
JsonValueReaderWriter |
Handles reading and writing JSON values for instances of the mapped type. (Inherited from CoreTypeMapping) |
KeyComparer |
A ValueComparer adds custom value comparison for use when comparing key values to each other. For example, when comparing a PK to and FK. (Inherited from CoreTypeMapping) |
Parameters |
Returns the parameters used to create this type mapping. (Inherited from RelationalTypeMapping) |
Precision |
Gets the precision of data the property is configured to store, or null if no precision is configured. (Inherited from RelationalTypeMapping) |
ProviderValueComparer |
A ValueComparer for the provider CLR type values. (Inherited from CoreTypeMapping) |
Scale |
Gets the scale of data the property is configured to store, or null if no scale is configured. (Inherited from RelationalTypeMapping) |
Size |
Gets the size of data the property is configured to store, or null if no size is configured. (Inherited from RelationalTypeMapping) |
SqlLiteralFormatString |
Gets the string format to be used to generate SQL literals of this type. (Inherited from RelationalTypeMapping) |
StoreType |
Gets the name of the database type. (Inherited from RelationalTypeMapping) |
StoreTypeNameBase |
Gets the base name of the database type. (Inherited from RelationalTypeMapping) |
StoreTypePostfix |
Gets the name of the database type. (Inherited from RelationalTypeMapping) |
StructuralComparer |
Obsolete.
A ValueComparer adds custom value comparison for use when a deep/structural copy and/or comparison is needed. (Inherited from CoreTypeMapping) |
ValueGeneratorFactory |
Obsolete.
An optional factory for creating a specific ValueGenerator to use with this mapping. (Inherited from CoreTypeMapping) |
Methods
Clone(CoreTypeMapping+CoreTypeMappingParameters) |
Creates a copy of this mapping. (Inherited from RelationalTypeMapping) |
Clone(Nullable<Int32>, Nullable<Int32>) |
Creates a copy of this mapping. (Inherited from RelationalTypeMapping) |
Clone(Nullable<RelationalTypeMappingInfo>, Type, ValueConverter, ValueComparer, ValueComparer, ValueComparer, CoreTypeMapping, JsonValueReaderWriter, Nullable<StoreTypePostfix>) |
Clones the type mapping to update any parameter if needed. (Inherited from RelationalTypeMapping) |
Clone(Nullable<TypeMappingInfo>, Type, ValueConverter, ValueComparer, ValueComparer, ValueComparer, CoreTypeMapping, JsonValueReaderWriter) |
Clones the type mapping to update any parameter if needed. (Inherited from CoreTypeMapping) |
Clone(RelationalTypeMapping+RelationalTypeMappingParameters) |
Creates a copy of this mapping. |
Clone(RelationalTypeMapping+RelationalTypeMappingParameters) |
Creates a copy of this mapping. (Inherited from RelationalTypeMapping) |
Clone(RelationalTypeMappingInfo) |
Clones the type mapping to update facets from the mapping info, if needed. (Inherited from RelationalTypeMapping) |
Clone(String, Nullable<Int32>) |
Creates a copy of this mapping. |
Clone(String, Nullable<Int32>) |
Creates a copy of this mapping. (Inherited from RelationalTypeMapping) |
Clone(ValueConverter) |
Returns a new copy of this type mapping with the given ValueConverter added. |
Clone(ValueConverter) |
Returns a new copy of this type mapping with the given ValueConverter added. (Inherited from RelationalTypeMapping) |
ConfigureParameter(DbParameter) |
Configures type information of a DbParameter. (Inherited from RelationalTypeMapping) |
CreateCopy(String, Nullable<Int32>) |
Creates a copy of this mapping. (Inherited from RelationalTypeMapping) |
CreateParameter(DbCommand, String, Object, Nullable<Boolean>) |
Creates a DbParameter with the appropriate type information configured. (Inherited from RelationalTypeMapping) |
CreateParameter(DbCommand, String, Object, Nullable<Boolean>, ParameterDirection) |
Creates a DbParameter with the appropriate type information configured. (Inherited from RelationalTypeMapping) |
CustomizeDataReaderExpression(Expression) |
Gets a custom expression tree for reading the value from the input data reader expression that contains the database value. (Inherited from RelationalTypeMapping) |
EscapeSqlLiteral(String) |
Generates the escaped SQL representation of a literal value. |
GenerateCodeLiteral(Object) |
Creates a an expression tree that can be used to generate code for the literal value. Currently, only very basic expressions such as constructor calls and factory methods taking simple constants are supported. (Inherited from CoreTypeMapping) |
GenerateNonNullSqlLiteral(Object) |
Generates the SQL representation of a literal value. |
GenerateProviderValueSqlLiteral(Object) |
Generates the SQL representation of a literal value without conversion. (Inherited from RelationalTypeMapping) |
GenerateSqlLiteral(Object) |
Generates the SQL representation of a literal value. (Inherited from RelationalTypeMapping) |
GetDataReaderMethod() |
The method to use when reading values of the given type. The method must be defined on DbDataReader or one of its subclasses. (Inherited from RelationalTypeMapping) |
ProcessStoreType(RelationalTypeMapping+RelationalTypeMappingParameters, String, String) |
Processes the store type name to add appropriate postfix/prefix text as needed. (Inherited from RelationalTypeMapping) |
WithComposedConverter(ValueConverter, ValueComparer, ValueComparer, CoreTypeMapping, JsonValueReaderWriter) |
Returns a new copy of this type mapping with the given ValueConverter added. (Inherited from RelationalTypeMapping) |
WithPrecisionAndScale(Nullable<Int32>, Nullable<Int32>) |
Creates a copy of this mapping. (Inherited from RelationalTypeMapping) |
WithStoreTypeAndSize(String, Nullable<Int32>) |
Creates a copy of this mapping. (Inherited from RelationalTypeMapping) |
WithTypeMappingInfo(RelationalTypeMappingInfo) |
Clones the type mapping to update facets from the mapping info, if needed. (Inherited from RelationalTypeMapping) |
Applies to
Entity Framework