# Class NpgsqlTypeMappingSource

Namespace
  Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.dll

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.

    public class NpgsqlTypeMappingSource : RelationalTypeMappingSource, IRelationalTypeMappingSource, ITypeMappingSource

Inheritance
  object
  TypeMappingSourceBase
  RelationalTypeMappingSource
  NpgsqlTypeMappingSource

Implements
  IRelationalTypeMappingSource
  ITypeMappingSource

Inherited Members
  RelationalTypeMappingSource.FindMapping(in TypeMappingInfo)
  RelationalTypeMappingSource.FindMapping(IElementType)
  RelationalTypeMappingSource.FindMapping(Type)
  RelationalTypeMappingSource.FindMapping(Type, IModel, CoreTypeMapping)
  RelationalTypeMappingSource.FindMapping(MemberInfo)
  RelationalTypeMappingSource.FindMapping(MemberInfo, IModel, bool)
  RelationalTypeMappingSource.FindMapping(string)
  RelationalTypeMappingSource.FindMapping(Type, string, bool, bool?, int?, bool?, bool?, int?, int?)
  RelationalTypeMappingSource.RelationalDependencies
  TypeMappingSourceBase.ValidateMapping(CoreTypeMapping, IProperty)
  TypeMappingSourceBase.TryFindJsonCollectionMapping(TypeMappingInfo, Type, Type, ref CoreTypeMapping, out ValueComparer, out JsonValueReaderWriter)
  TypeMappingSourceBase.Dependencies
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Constructors

### NpgsqlTypeMappingSource(TypeMappingSourceDependencies, RelationalTypeMappingSourceDependencies, ISqlGenerationHelper, INpgsqlSingletonOptions)

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.

    public NpgsqlTypeMappingSource(TypeMappingSourceDependencies dependencies, RelationalTypeMappingSourceDependencies relationalDependencies, ISqlGenerationHelper sqlGenerationHelper, INpgsqlSingletonOptions options)

#### Parameters

`dependencies` TypeMappingSourceDependencies
`relationalDependencies` RelationalTypeMappingSourceDependencies
`sqlGenerationHelper` ISqlGenerationHelper
`options` INpgsqlSingletonOptions

## Fields

### EStringTypeMapping

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.

    public readonly NpgsqlEStringTypeMapping EStringTypeMapping

#### Field Value

NpgsqlEStringTypeMapping

## Properties

### ClrTypeMappings

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.

    protected virtual ConcurrentDictionary<Type, RelationalTypeMapping> ClrTypeMappings { get; }

#### Property Value

ConcurrentDictionary<Type, RelationalTypeMapping>

### StoreTypeMappings

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.

    protected virtual ConcurrentDictionary<string, RelationalTypeMapping[]> StoreTypeMappings { get; }

#### Property Value

ConcurrentDictionary<string, RelationalTypeMapping[]>

## Methods

### FindBaseMapping(in RelationalTypeMappingInfo)

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.

    protected virtual RelationalTypeMapping? FindBaseMapping(in RelationalTypeMappingInfo mappingInfo)

#### Parameters

`mappingInfo` RelationalTypeMappingInfo

#### Returns

RelationalTypeMapping

### FindCollectionMapping(RelationalTypeMappingInfo, Type?, Type?, CoreTypeMapping?)

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.

    protected override RelationalTypeMapping? FindCollectionMapping(RelationalTypeMappingInfo info, Type? modelType, Type? providerType, CoreTypeMapping? elementMapping)

#### Parameters

`info` RelationalTypeMappingInfo
`modelType` Type
`providerType` Type
`elementMapping` CoreTypeMapping

#### Returns

RelationalTypeMapping

### FindCollectionMapping(string?, Type?, Type?, CoreTypeMapping?)

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.

    [EntityFrameworkInternal]
    public virtual RelationalTypeMapping? FindCollectionMapping(string? storeType, Type? modelClrType, Type? providerClrType, CoreTypeMapping? elementMapping)

#### Parameters

`storeType` string
`modelClrType` Type
`providerClrType` Type
`elementMapping` CoreTypeMapping

#### Returns

RelationalTypeMapping

### FindContainerMapping(Type, RelationalTypeMapping, IModel)

Finds the mapping for a container given its CLR type and its containee's type mapping; this is used when inferring type mappings for arrays and ranges/multiranges.

    public virtual RelationalTypeMapping? FindContainerMapping(Type containerClrType, RelationalTypeMapping containeeTypeMapping, IModel model)

#### Parameters

`containerClrType` Type
`containeeTypeMapping` RelationalTypeMapping
`model` IModel

#### Returns

RelationalTypeMapping

### FindEnumMapping(in RelationalTypeMappingInfo)

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.

    protected virtual RelationalTypeMapping? FindEnumMapping(in RelationalTypeMappingInfo mappingInfo)

#### Parameters

`mappingInfo` RelationalTypeMappingInfo

#### Returns

RelationalTypeMapping

### FindMapping(IProperty)

Finds the type mapping for a given IProperty.

    public override RelationalTypeMapping? FindMapping(IProperty property)

#### Parameters

`property` IProperty

  The property.

#### Returns

RelationalTypeMapping

  The type mapping, or null if none was found.

#### Remarks

Note: providers should typically not need to override this method.

### FindMapping(in RelationalTypeMappingInfo)

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.

    protected override RelationalTypeMapping? FindMapping(in RelationalTypeMappingInfo mappingInfo)

#### Parameters

`mappingInfo` RelationalTypeMappingInfo

#### Returns

RelationalTypeMapping

### FindRowValueMapping(in RelationalTypeMappingInfo)

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.

    protected virtual RelationalTypeMapping? FindRowValueMapping(in RelationalTypeMappingInfo mappingInfo)

#### Parameters

`mappingInfo` RelationalTypeMappingInfo

#### Returns

RelationalTypeMapping

### FindUserRangeMapping(in RelationalTypeMappingInfo)

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.

    protected virtual RelationalTypeMapping? FindUserRangeMapping(in RelationalTypeMappingInfo mappingInfo)

#### Parameters

`mappingInfo` RelationalTypeMappingInfo

#### Returns

RelationalTypeMapping

### ParseStoreTypeName(string?, ref bool?, ref int?, ref int?, ref int?)

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.

    protected override string? ParseStoreTypeName(string? storeTypeName, ref bool? unicode, ref int? size, ref int? precision, ref int? scale)

#### Parameters

`storeTypeName` string
`unicode` bool?
`size` int?
`precision` int?
`scale` int?

#### Returns

string