4
4
using System . Collections . Concurrent ;
5
5
using System . Data ;
6
6
using System . Globalization ;
7
+ using Microsoft . EntityFrameworkCore . Storage . Internal ;
7
8
using Microsoft . EntityFrameworkCore . Storage . Json ;
8
9
9
10
namespace Microsoft . EntityFrameworkCore . Storage ;
@@ -278,7 +279,7 @@ private static MethodInfo GetDataReaderMethod(string name)
278
279
/// <summary>
279
280
/// Gets the mapping to be used when the only piece of information is that there is a null value.
280
281
/// </summary>
281
- public static readonly NullTypeMapping NullMapping = NullTypeMapping . Default ;
282
+ public static readonly RelationalTypeMapping NullMapping = NullTypeMapping . Default ;
282
283
283
284
/// <summary>
284
285
/// Initializes a new instance of the <see cref="RelationalTypeMapping" /> class.
@@ -417,7 +418,7 @@ protected override CoreTypeMapping Clone(CoreTypeMappingParameters parameters)
417
418
/// <param name="storeType">The name of the database type.</param>
418
419
/// <param name="size">The size of data the property is configured to store, or null if no size is configured.</param>
419
420
/// <returns>The newly created mapping.</returns>
420
- public virtual RelationalTypeMapping Clone ( string storeType , int ? size )
421
+ public virtual RelationalTypeMapping WithStoreTypeAndSize ( string storeType , int ? size )
421
422
=> Clone ( Parameters . WithStoreTypeAndSize ( storeType , size ) ) ;
422
423
423
424
/// <summary>
@@ -426,11 +427,11 @@ public virtual RelationalTypeMapping Clone(string storeType, int? size)
426
427
/// <param name="precision">The precision of data the property is configured to store, or null if no size is configured.</param>
427
428
/// <param name="scale">The scale of data the property is configured to store, or null if no size is configured.</param>
428
429
/// <returns>The newly created mapping.</returns>
429
- public virtual RelationalTypeMapping Clone ( int ? precision , int ? scale )
430
+ public virtual RelationalTypeMapping WithPrecisionAndScale ( int ? precision , int ? scale )
430
431
=> Clone ( Parameters . WithPrecisionAndScale ( precision , scale ) ) ;
431
432
432
433
/// <inheritdoc />
433
- public override CoreTypeMapping Clone (
434
+ public override CoreTypeMapping WithComposedConverter (
434
435
ValueConverter ? converter ,
435
436
ValueComparer ? comparer = null ,
436
437
ValueComparer ? keyComparer = null ,
@@ -443,35 +444,35 @@ public override CoreTypeMapping Clone(
443
444
/// </summary>
444
445
/// <param name="mappingInfo">The mapping info containing the facets to use.</param>
445
446
/// <returns>The cloned mapping, or the original mapping if no clone was needed.</returns>
446
- public virtual RelationalTypeMapping Clone (
447
+ public virtual RelationalTypeMapping WithTypeMappingInfo (
447
448
in RelationalTypeMappingInfo mappingInfo )
448
449
=> Clone ( Parameters . WithTypeMappingInfo ( mappingInfo ) ) ;
449
450
450
- /// <inheritdoc />
451
- public override CoreTypeMapping Clone (
452
- in TypeMappingInfo ? mappingInfo = null ,
453
- Type ? clrType = null ,
454
- ValueConverter ? converter = null ,
455
- ValueComparer ? comparer = null ,
456
- ValueComparer ? keyComparer = null ,
457
- ValueComparer ? providerValueComparer = null ,
458
- CoreTypeMapping ? elementMapping = null ,
459
- JsonValueReaderWriter ? jsonValueReaderWriter = null )
460
- => Clone (
461
- mappingInfo == null
462
- ? null
463
- : new RelationalTypeMappingInfo (
464
- unicode : mappingInfo . Value . IsUnicode ,
465
- size : mappingInfo . Value . Size ,
466
- precision : mappingInfo . Value . Precision ,
467
- scale : mappingInfo . Value . Scale ) ,
468
- clrType ,
469
- converter ,
470
- comparer ,
471
- keyComparer ,
472
- providerValueComparer ,
473
- elementMapping ,
474
- jsonValueReaderWriter ) ;
451
+ // // / <inheritdoc />
452
+ // public override CoreTypeMapping Clone(
453
+ // in TypeMappingInfo? mappingInfo = null,
454
+ // Type? clrType = null,
455
+ // ValueConverter? converter = null,
456
+ // ValueComparer? comparer = null,
457
+ // ValueComparer? keyComparer = null,
458
+ // ValueComparer? providerValueComparer = null,
459
+ // CoreTypeMapping? elementMapping = null,
460
+ // JsonValueReaderWriter? jsonValueReaderWriter = null)
461
+ // => Clone(
462
+ // mappingInfo == null
463
+ // ? null
464
+ // : new RelationalTypeMappingInfo(
465
+ // unicode: mappingInfo.Value.IsUnicode,
466
+ // size: mappingInfo.Value.Size,
467
+ // precision: mappingInfo.Value.Precision,
468
+ // scale: mappingInfo.Value.Scale),
469
+ // clrType,
470
+ // converter,
471
+ // comparer,
472
+ // keyComparer,
473
+ // providerValueComparer,
474
+ // elementMapping,
475
+ // jsonValueReaderWriter);
475
476
476
477
/// <summary>
477
478
/// Clones the type mapping to update any parameter if needed.
0 commit comments