@@ -432,7 +432,7 @@ public DynamoDBFlatConfig(DynamoDBOperationConfig operationConfig, DynamoDBConte
432
432
bool ignoreNullValues = operationConfig . IgnoreNullValues ?? contextConfig . IgnoreNullValues ?? false ;
433
433
bool retrieveDateTimeInUtc = operationConfig . RetrieveDateTimeInUtc ?? contextConfig . RetrieveDateTimeInUtc ?? true ;
434
434
bool isEmptyStringValueEnabled = operationConfig . IsEmptyStringValueEnabled ?? contextConfig . IsEmptyStringValueEnabled ?? false ;
435
- DynamoDBEntryConversion conversion = operationConfig . Conversion ?? contextConfig . Conversion ?? DynamoDBEntryConversion . CurrentConversion ;
435
+ DynamoDBEntryConversion conversion = contextConfig . Conversion ?? DynamoDBEntryConversion . CurrentConversion ;
436
436
string tableNamePrefix = operationConfig . TableNamePrefix ?? contextConfig . TableNamePrefix ?? string . Empty ;
437
437
438
438
// These properties can only be set at the operation level
@@ -463,15 +463,16 @@ public DynamoDBFlatConfig(DynamoDBOperationConfig operationConfig, DynamoDBConte
463
463
IndexName = indexName ;
464
464
QueryFilter = queryFilter ;
465
465
ConditionalOperator = conditionalOperator ;
466
- Conversion = conversion ;
466
+ ContextConversion = conversion ;
467
+ OperationConversion = operationConfig . Conversion ;
467
468
MetadataCachingMode = metadataCachingMode ;
468
469
DisableFetchingTableMetadata = disableFetchingTableMetadata ;
469
470
RetrieveDateTimeInUtc = retrieveDateTimeInUtc ;
470
471
DerivedTypeAttributeName = derivedTypeAttributeName ;
471
472
472
473
State = new OperationState ( ) ;
473
474
}
474
-
475
+
475
476
/// <summary>
476
477
/// Property that directs DynamoDBContext to use consistent reads.
477
478
/// If property is not set, behavior defaults to non-consistent reads.
@@ -552,10 +553,29 @@ public DynamoDBFlatConfig(DynamoDBOperationConfig operationConfig, DynamoDBConte
552
553
public List < ScanCondition > QueryFilter { get ; set ; }
553
554
554
555
/// <summary>
555
- /// Conversion specification which controls how conversion between
556
+ /// Entity Conversion specification which controls how conversion between
556
557
/// .NET and DynamoDB types happens.
557
558
/// </summary>
558
- public DynamoDBEntryConversion Conversion { get ; set ; }
559
+ public DynamoDBEntryConversion ItemConversion { get ; set ; }
560
+
561
+
562
+ /// <summary>
563
+ /// Operation Conversion specification which controls how conversion between
564
+ /// .NET and DynamoDB types happens.
565
+ /// </summary>
566
+ private DynamoDBEntryConversion OperationConversion { get ; }
567
+
568
+ /// <summary>
569
+ /// Context Conversion specification which controls how conversion between
570
+ /// .NET and DynamoDB types happens.
571
+ /// </summary>
572
+ public DynamoDBEntryConversion Conversion => OperationConversion ?? ItemConversion ?? ContextConversion ;
573
+
574
+ /// <summary>
575
+ /// Context Conversion specification which controls how conversion between
576
+ /// .NET and DynamoDB types happens.
577
+ /// </summary>
578
+ private DynamoDBEntryConversion ContextConversion { get ; }
559
579
560
580
/// <inheritdoc cref="DynamoDBContextConfig.DisableFetchingTableMetadata"/>
561
581
public bool DisableFetchingTableMetadata { get ; set ; }
@@ -564,7 +584,7 @@ public DynamoDBFlatConfig(DynamoDBOperationConfig operationConfig, DynamoDBConte
564
584
public bool RetrieveDateTimeInUtc { get ; set ; }
565
585
566
586
// Checks if the IndexName is set on the config
567
- internal bool IsIndexOperation { get { return ! string . IsNullOrEmpty ( IndexName ) ; } }
587
+ internal bool IsIndexOperation => ! string . IsNullOrEmpty ( IndexName ) ;
568
588
569
589
// State of the operation using this config
570
590
internal OperationState State { get ; private set ; }
@@ -584,6 +604,7 @@ public DynamoDBFlatConfig(DynamoDBOperationConfig operationConfig, DynamoDBConte
584
604
/// </remarks>
585
605
public string DerivedTypeAttributeName { get ; set ; }
586
606
607
+
587
608
public class OperationState
588
609
{
589
610
private CircularReferenceTracking referenceTracking ;
0 commit comments