StringTypeMapping Class

Definition

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
StringTypeMapping
Inheritance

Remarks

See Implementation of database providers and extensions for more information.

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)
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)
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)
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

An optional factory for creating a specific ValueGenerator to use with this mapping.

(Inherited from CoreTypeMapping)

Methods

Clone(Nullable<Int32>, Nullable<Int32>)

Creates a copy of this mapping.

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

Applies to