StringRelationalTypeMapper StringRelationalTypeMapper Class

Maps string property types to their corresponding relational database types.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

Syntax

Declaration

public class StringRelationalTypeMapper : IStringRelationalTypeMapperPublic Class StringRelationalTypeMapper
    Implements IStringRelationalTypeMapper

Inheritance Hierarchy

  • System.Object
    System.Object
  • StringRelationalTypeMapper
    StringRelationalTypeMapper

Inherited Members

ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Constructors summary

Initializes a new instance of the StringRelationalTypeMapper class.

Properties summary

Gets the function to create a mapping for a bounded ANSI string.

Gets the function to create a mapping for a bounded Unicode string.

Gets the default mapping of an ANSI string.

Gets the default mapping of a Unicode string.

Gets the mapping for an ANSI string that is part of a key.

Gets the mapping for a Unicode string that is part of a key.

Gets the maximum length of a bounded ANSI string.

Gets the maximum length of a bounded Unicode string.

Gets the mapping for an unbounded ANSI string.

Gets the mapping for an unbounded Unicode string.

Methods summary

Gets the relational database type for a string property.

Constructors

  • StringRelationalTypeMapper(Int32, RelationalTypeMapping, RelationalTypeMapping, RelationalTypeMapping, Func<Int32, RelationalTypeMapping>, Int32, RelationalTypeMapping, RelationalTypeMapping, RelationalTypeMapping, Func<Int32, RelationalTypeMapping>)
    StringRelationalTypeMapper(Int32, RelationalTypeMapping, RelationalTypeMapping, RelationalTypeMapping, Func(Of Int32, RelationalTypeMapping), Int32, RelationalTypeMapping, RelationalTypeMapping, RelationalTypeMapping, Func(Of Int32, RelationalTypeMapping))

    Initializes a new instance of the StringRelationalTypeMapper class.

    public StringRelationalTypeMapper(int maxBoundedAnsiLength, RelationalTypeMapping defaultAnsiMapping, RelationalTypeMapping unboundedAnsiMapping, RelationalTypeMapping keyAnsiMapping, Func<int, RelationalTypeMapping> createBoundedAnsiMapping, int maxBoundedUnicodeLength, RelationalTypeMapping defaultUnicodeMapping, RelationalTypeMapping unboundedUnicodeMapping, RelationalTypeMapping keyUnicodeMapping, Func<int, RelationalTypeMapping> createBoundedUnicodeMapping)Public Sub New(maxBoundedAnsiLength As Integer, defaultAnsiMapping As RelationalTypeMapping, unboundedAnsiMapping As RelationalTypeMapping, keyAnsiMapping As RelationalTypeMapping, createBoundedAnsiMapping As Func(Of Integer, RelationalTypeMapping), maxBoundedUnicodeLength As Integer, defaultUnicodeMapping As RelationalTypeMapping, unboundedUnicodeMapping As RelationalTypeMapping, keyUnicodeMapping As RelationalTypeMapping, createBoundedUnicodeMapping As Func(Of Integer, RelationalTypeMapping))

    Parameters

Properties

  • CreateBoundedAnsiMapping
    CreateBoundedAnsiMapping

    Gets the function to create a mapping for a bounded ANSI string.

    public virtual Func<int, RelationalTypeMapping> CreateBoundedAnsiMapping { get; }Public Overridable ReadOnly Property CreateBoundedAnsiMapping As Func(Of Integer, RelationalTypeMapping)

    Property Value

  • CreateBoundedUnicodeMapping
    CreateBoundedUnicodeMapping

    Gets the function to create a mapping for a bounded Unicode string.

    public virtual Func<int, RelationalTypeMapping> CreateBoundedUnicodeMapping { get; }Public Overridable ReadOnly Property CreateBoundedUnicodeMapping As Func(Of Integer, RelationalTypeMapping)

    Property Value

  • DefaultAnsiMapping
    DefaultAnsiMapping

    Gets the default mapping of an ANSI string.

    public virtual RelationalTypeMapping DefaultAnsiMapping { get; }Public Overridable ReadOnly Property DefaultAnsiMapping As RelationalTypeMapping

    Property Value

  • DefaultUnicodeMapping
    DefaultUnicodeMapping

    Gets the default mapping of a Unicode string.

    public virtual RelationalTypeMapping DefaultUnicodeMapping { get; }Public Overridable ReadOnly Property DefaultUnicodeMapping As RelationalTypeMapping

    Property Value

  • KeyAnsiMapping
    KeyAnsiMapping

    Gets the mapping for an ANSI string that is part of a key.

    public virtual RelationalTypeMapping KeyAnsiMapping { get; }Public Overridable ReadOnly Property KeyAnsiMapping As RelationalTypeMapping

    Property Value

  • KeyUnicodeMapping
    KeyUnicodeMapping

    Gets the mapping for a Unicode string that is part of a key.

    public virtual RelationalTypeMapping KeyUnicodeMapping { get; }Public Overridable ReadOnly Property KeyUnicodeMapping As RelationalTypeMapping

    Property Value

  • MaxBoundedAnsiLength
    MaxBoundedAnsiLength

    Gets the maximum length of a bounded ANSI string.

    public virtual int MaxBoundedAnsiLength { get; }Public Overridable ReadOnly Property MaxBoundedAnsiLength As Integer

    Property Value

    • System.Int32
      System.Int32
  • MaxBoundedUnicodeLength
    MaxBoundedUnicodeLength

    Gets the maximum length of a bounded Unicode string.

    public virtual int MaxBoundedUnicodeLength { get; }Public Overridable ReadOnly Property MaxBoundedUnicodeLength As Integer

    Property Value

    • System.Int32
      System.Int32
  • UnboundedAnsiMapping
    UnboundedAnsiMapping

    Gets the mapping for an unbounded ANSI string.

    public virtual RelationalTypeMapping UnboundedAnsiMapping { get; }Public Overridable ReadOnly Property UnboundedAnsiMapping As RelationalTypeMapping

    Property Value

  • UnboundedUnicodeMapping
    UnboundedUnicodeMapping

    Gets the mapping for an unbounded Unicode string.

    public virtual RelationalTypeMapping UnboundedUnicodeMapping { get; }Public Overridable ReadOnly Property UnboundedUnicodeMapping As RelationalTypeMapping

    Property Value

Methods

  • FindMapping(Boolean, Boolean, Nullable<Int32>)
    FindMapping(Boolean, Boolean, Nullable(Of Int32))

    Gets the relational database type for a string property.

    public virtual RelationalTypeMapping FindMapping(bool unicode, bool keyOrIndex, int ? maxLength)Public Overridable Function FindMapping(unicode As Boolean, keyOrIndex As Boolean, maxLength As Integer?) As RelationalTypeMapping

    Parameters

    • unicode
      System.Boolean
      System.Boolean

      A value indicating whether the property should handle Unicode data or not.

    • keyOrIndex
      System.Boolean
      System.Boolean

      A value indicating whether the property is part of a key or not.

    • maxLength
      System.Nullable<T><System.Int32>
      System.Nullable<T>(Of System.Int32)

      The maximum length of data the property is configured to store, or null if no maximum is configured.

    Returns

Details

Assembly

Microsoft.EntityFrameworkCore.Relational.dll