RelationalTypeMapping.Clone Method
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.
Overloads
Clone(Nullable<RelationalTypeMappingInfo>, Type, ValueConverter, ValueComparer, ValueComparer, ValueComparer, CoreTypeMapping, JsonValueReaderWriter, Nullable<StoreTypePostfix>) |
Clones the type mapping to update any parameter if needed. |
Clone(String, Nullable<Int32>) |
Creates a copy of this mapping. |
Clone(Nullable<Int32>, Nullable<Int32>) |
Creates a copy of this mapping. |
Clone(ValueConverter) |
Returns a new copy of this type mapping with the given ValueConverter added. |
Clone(RelationalTypeMappingInfo) |
Clones the type mapping to update facets from the mapping info, if needed. |
Clone(RelationalTypeMapping+RelationalTypeMappingParameters) |
Creates a copy of this mapping. |
Clone(CoreTypeMapping+CoreTypeMappingParameters) |
Creates a copy of this mapping. |
Clone(Nullable<RelationalTypeMappingInfo>, Type, ValueConverter, ValueComparer, ValueComparer, ValueComparer, CoreTypeMapping, JsonValueReaderWriter, Nullable<StoreTypePostfix>)
Clones the type mapping to update any parameter if needed.
public virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping Clone (in Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingInfo?? mappingInfo = default, Type? clrType = default, Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter? converter = default, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? comparer = default, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? keyComparer = default, Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer? providerValueComparer = default, Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping? elementMapping = default, Microsoft.EntityFrameworkCore.Storage.Json.JsonValueReaderWriter? jsonValueReaderWriter = default, Microsoft.EntityFrameworkCore.Storage.StoreTypePostfix? storeTypePostfix = default);
override this.Clone : Nullable * Type * Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer * Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping * Microsoft.EntityFrameworkCore.Storage.Json.JsonValueReaderWriter * Nullable<Microsoft.EntityFrameworkCore.Storage.StoreTypePostfix> -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Overridable Function Clone (Optional mappingInfo As Nullable(Of RelationalTypeMappingInfo) = Nothing, Optional clrType As Type = Nothing, Optional converter As ValueConverter = Nothing, Optional comparer As ValueComparer = Nothing, Optional keyComparer As ValueComparer = Nothing, Optional providerValueComparer As ValueComparer = Nothing, Optional elementMapping As CoreTypeMapping = Nothing, Optional jsonValueReaderWriter As JsonValueReaderWriter = Nothing, Optional storeTypePostfix As Nullable(Of StoreTypePostfix) = Nothing) As RelationalTypeMapping
Parameters
- mappingInfo
- Nullable<RelationalTypeMappingInfo>
The mapping info containing the facets to use.
- clrType
- Type
The .NET type used in the EF model, or null
to leave unchanged.
- converter
- ValueConverter
The value converter, or null
to leave unchanged.
- comparer
- ValueComparer
The value comparer, or null
to leave unchanged.
- keyComparer
- ValueComparer
The key value comparer, or null
to leave unchanged.
- providerValueComparer
- ValueComparer
The provider value comparer, or null
to leave unchanged.
- elementMapping
- CoreTypeMapping
The element mapping, or null
to leave unchanged.
- jsonValueReaderWriter
- JsonValueReaderWriter
The JSON reader/writer, or null
to leave unchanged.
- storeTypePostfix
- Nullable<StoreTypePostfix>
The new postfix, or null
to leave unchanged.
Returns
The cloned mapping, or the original mapping if no clone was needed.
Applies to
Clone(String, Nullable<Int32>)
Creates a copy of this mapping.
public abstract Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping Clone (string storeType, int? size);
public virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping Clone (string storeType, int? size);
abstract member Clone : string * Nullable<int> -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
override this.Clone : string * Nullable<int> -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public MustOverride Function Clone (storeType As String, size As Nullable(Of Integer)) As RelationalTypeMapping
Public Overridable Function Clone (storeType As String, size As Nullable(Of Integer)) As RelationalTypeMapping
Parameters
- storeType
- String
The name of the database type.
The size of data the property is configured to store, or null if no size is configured.
Returns
The newly created mapping.
Applies to
Clone(Nullable<Int32>, Nullable<Int32>)
Creates a copy of this mapping.
public virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping Clone (int? precision, int? scale);
override this.Clone : Nullable<int> * Nullable<int> -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Overridable Function Clone (precision As Nullable(Of Integer), scale As Nullable(Of Integer)) As RelationalTypeMapping
Parameters
The precision of data the property is configured to store, or null if no size is configured.
The scale of data the property is configured to store, or null if no size is configured.
Returns
The newly created mapping.
Applies to
Clone(ValueConverter)
Returns a new copy of this type mapping with the given ValueConverter added.
public override Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping Clone (Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter converter);
public override Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping Clone (Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter? converter);
override this.Clone : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Public Overrides Function Clone (converter As ValueConverter) As CoreTypeMapping
Parameters
- converter
- ValueConverter
The converter to use.
Returns
A new type mapping
Applies to
Clone(RelationalTypeMappingInfo)
Clones the type mapping to update facets from the mapping info, if needed.
public virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping Clone (in Microsoft.EntityFrameworkCore.Storage.RelationalTypeMappingInfo mappingInfo);
override this.Clone : RelationalTypeMappingInfo -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Public Overridable Function Clone (mappingInfo As RelationalTypeMappingInfo) As RelationalTypeMapping
Parameters
- mappingInfo
- RelationalTypeMappingInfo
The mapping info containing the facets to use.
Returns
The cloned mapping, or the original mapping if no clone was needed.
Applies to
Clone(RelationalTypeMapping+RelationalTypeMappingParameters)
Creates a copy of this mapping.
protected virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping Clone (Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping.RelationalTypeMappingParameters parameters);
protected abstract Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping Clone (Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping.RelationalTypeMappingParameters parameters);
override this.Clone : Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping.RelationalTypeMappingParameters -> Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping
Protected Overridable Function Clone (parameters As RelationalTypeMapping.RelationalTypeMappingParameters) As RelationalTypeMapping
Protected MustOverride Function Clone (parameters As RelationalTypeMapping.RelationalTypeMappingParameters) As RelationalTypeMapping
Parameters
The parameters for this mapping.
Returns
The newly created mapping.
Applies to
Clone(CoreTypeMapping+CoreTypeMappingParameters)
Creates a copy of this mapping.
protected override Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping Clone (Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping.CoreTypeMappingParameters parameters);
override this.Clone : Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping.CoreTypeMappingParameters -> Microsoft.EntityFrameworkCore.Storage.CoreTypeMapping
Protected Overrides Function Clone (parameters As CoreTypeMapping.CoreTypeMappingParameters) As CoreTypeMapping
Parameters
- parameters
- CoreTypeMapping.CoreTypeMappingParameters
The parameters for this mapping.
Returns
The newly created mapping.
Applies to
Entity Framework