diff --git a/src/EFCore.Cosmos/ChangeTracking/Internal/ListComparer.cs b/src/EFCore.Cosmos/ChangeTracking/Internal/ListComparer.cs deleted file mode 100644 index 576b8d33c26..00000000000 --- a/src/EFCore.Cosmos/ChangeTracking/Internal/ListComparer.cs +++ /dev/null @@ -1,92 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace Microsoft.EntityFrameworkCore.Cosmos.ChangeTracking.Internal; - -/// -/// 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 sealed class ListComparer : ValueComparer - where TCollection : class, IEnumerable -{ - /// - /// 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 ListComparer(ValueComparer elementComparer, bool readOnly) - : base( - (a, b) => Compare(a, b, (ValueComparer)elementComparer), - o => GetHashCode(o, (ValueComparer)elementComparer), - source => Snapshot(source, (ValueComparer)elementComparer, readOnly)) - { - } - - /// - /// 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 override Type Type - => typeof(TCollection); - - private static bool Compare(TCollection? a, TCollection? b, ValueComparer elementComparer) - { - if (a is not IReadOnlyList aList) - { - return b is not IReadOnlyList; - } - - if (b is not IReadOnlyList bList || aList.Count != bList.Count) - { - return false; - } - - if (ReferenceEquals(aList, bList)) - { - return true; - } - - for (var i = 0; i < aList.Count; i++) - { - if (!elementComparer.Equals(aList[i], bList[i])) - { - return false; - } - } - - return true; - } - - private static int GetHashCode(TCollection source, ValueComparer elementComparer) - { - var hash = new HashCode(); - foreach (var el in source) - { - hash.Add(el, elementComparer); - } - - return hash.ToHashCode(); - } - - private static TCollection Snapshot(TCollection source, ValueComparer elementComparer, bool readOnly) - { - if (readOnly) - { - return source; - } - - var snapshot = new List(((IReadOnlyList)source).Count); - foreach (var e in source) - { - snapshot.Add(e is null ? default! : elementComparer.Snapshot(e)); - } - - return (TCollection)(object)snapshot; - } -} diff --git a/src/EFCore.Cosmos/ChangeTracking/Internal/NullableListComparer.cs b/src/EFCore.Cosmos/ChangeTracking/Internal/NullableListComparer.cs deleted file mode 100644 index 80fcb55b72f..00000000000 --- a/src/EFCore.Cosmos/ChangeTracking/Internal/NullableListComparer.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace Microsoft.EntityFrameworkCore.Cosmos.ChangeTracking.Internal; - -/// -/// 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 sealed class NullableListComparer : ValueComparer - where TCollection : class, IEnumerable - where TElement : struct -{ - /// - /// 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 NullableListComparer(ValueComparer elementComparer, bool readOnly) - : base( - (a, b) => Compare(a, b, (ValueComparer)elementComparer), - o => GetHashCode(o, (ValueComparer)elementComparer), - source => Snapshot(source, (ValueComparer)elementComparer, readOnly)) - { - } - - /// - /// 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 override Type Type - => typeof(TCollection); - - private static bool Compare(TCollection? a, TCollection? b, ValueComparer elementComparer) - { - if (a is not IReadOnlyList aList) - { - return b is not IReadOnlyList; - } - - if (b is not IReadOnlyList bList || aList.Count != bList.Count) - { - return false; - } - - if (ReferenceEquals(aList, bList)) - { - return true; - } - - for (var i = 0; i < aList.Count; i++) - { - var (aElement, bElement) = (aList[i], bList[i]); - if (aElement is null) - { - if (bElement is null) - { - continue; - } - - return false; - } - - if (bElement is null || !elementComparer.Equals(aElement, bElement)) - { - return false; - } - } - - return true; - } - - private static int GetHashCode(TCollection source, ValueComparer elementComparer) - { - var nullableEqualityComparer = new NullableEqualityComparer(elementComparer); - var hash = new HashCode(); - foreach (var el in source) - { - hash.Add(el, nullableEqualityComparer); - } - - return hash.ToHashCode(); - } - - private static TCollection Snapshot(TCollection source, ValueComparer elementComparer, bool readOnly) - { - if (readOnly) - { - return source; - } - - var snapshot = new List(((IReadOnlyList)source).Count); - foreach (var e in source) - { - snapshot.Add(e is null ? null : elementComparer.Snapshot(e.Value)); - } - - return (TCollection)(object)snapshot; - } -} diff --git a/src/EFCore.Cosmos/ChangeTracking/Internal/NullableSingleDimensionalArrayComparer.cs b/src/EFCore.Cosmos/ChangeTracking/Internal/NullableSingleDimensionalArrayComparer.cs deleted file mode 100644 index 240c16903d6..00000000000 --- a/src/EFCore.Cosmos/ChangeTracking/Internal/NullableSingleDimensionalArrayComparer.cs +++ /dev/null @@ -1,99 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace Microsoft.EntityFrameworkCore.Cosmos.ChangeTracking.Internal; - -/// -/// 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 sealed class NullableSingleDimensionalArrayComparer : ValueComparer - where TElement : struct -{ - /// - /// 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 NullableSingleDimensionalArrayComparer(ValueComparer elementComparer) - : base( - (a, b) => Compare(a, b, (ValueComparer)elementComparer), - o => GetHashCode(o, (ValueComparer)elementComparer), - source => Snapshot(source, (ValueComparer)elementComparer)) - { - } - - /// - /// 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 override Type Type - => typeof(TElement?[]); - - private static bool Compare(TElement?[]? a, TElement?[]? b, ValueComparer elementComparer) - { - if (a is null) - { - return b is null; - } - - if (b is null || a.Length != b.Length) - { - return false; - } - - if (ReferenceEquals(a, b)) - { - return true; - } - - for (var i = 0; i < a.Length; i++) - { - var (aElement, bElement) = (a[i], b[i]); - if (aElement is null) - { - if (bElement is null) - { - continue; - } - - return false; - } - - if (bElement is null || !elementComparer.Equals(aElement, bElement)) - { - return false; - } - } - - return true; - } - - private static int GetHashCode(TElement?[] source, ValueComparer elementComparer) - { - var nullableEqualityComparer = new NullableEqualityComparer(elementComparer); - var hash = new HashCode(); - foreach (var el in source) - { - hash.Add(el, nullableEqualityComparer); - } - - return hash.ToHashCode(); - } - - private static TElement?[] Snapshot(TElement?[] source, ValueComparer elementComparer) - { - var snapshot = new TElement?[source.Length]; - for (var i = 0; i < source.Length; i++) - { - snapshot[i] = source[i] is { } value ? elementComparer.Snapshot(value) : null; - } - - return snapshot; - } -} diff --git a/src/EFCore.Cosmos/ChangeTracking/Internal/SingleDimensionalArrayComparer.cs b/src/EFCore.Cosmos/ChangeTracking/Internal/SingleDimensionalArrayComparer.cs deleted file mode 100644 index f51422c4f73..00000000000 --- a/src/EFCore.Cosmos/ChangeTracking/Internal/SingleDimensionalArrayComparer.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -using static System.Linq.Expressions.Expression; - -namespace Microsoft.EntityFrameworkCore.Cosmos.ChangeTracking.Internal; - -/// -/// 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 sealed class SingleDimensionalArrayComparer : ValueComparer -{ - internal static readonly PropertyInfo ArrayLengthProperty - = typeof(Array).GetRuntimeProperty(nameof(Array.Length))!; - - /// - /// 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 SingleDimensionalArrayComparer(ValueComparer elementComparer) - : base( - CreateEqualsExpression(elementComparer), - CreateHashCodeExpression(elementComparer), - CreateSnapshotExpression(elementComparer)) - { - } - - /// - /// 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 override Type Type - => typeof(TElement[]); - - private static Expression> CreateEqualsExpression(ValueComparer elementComparer) - { - var type = typeof(TElement[]); - var param1 = Parameter(type, "v1"); - var param2 = Parameter(type, "v2"); - - return Lambda>( - Condition( - Equal(param1, Constant(null, type)), - Equal(param2, Constant(null, type)), - AndAlso( - NotEqual(param2, Constant(null, type)), - AndAlso( - Equal(MakeMemberAccess(param1, ArrayLengthProperty), MakeMemberAccess(param2, ArrayLengthProperty)), - OrElse( - ReferenceEqual(param1, param2), - Call( - EnumerableMethods.All.MakeGenericMethod(typeof(bool)), - Call( - EnumerableMethods.ZipWithSelector.MakeGenericMethod(typeof(TElement), typeof(TElement), typeof(bool)), - param1, - param2, - elementComparer.EqualsExpression), -#pragma warning disable EF1001 // Internal EF Core API usage. - BoolIdentity))))), -#pragma warning restore EF1001 // Internal EF Core API usage. - param1, param2); - } - - private static Expression> CreateHashCodeExpression(ValueComparer elementComparer) - { - var elementType = typeof(TElement); - var param = Parameter(typeof(TElement[]), "v"); - - var aggregateParam = Parameter(typeof(HashCode), "h"); - var aggregateElementParam = Parameter(elementType, "e"); -#pragma warning disable EF1001 // Internal EF Core API usage. - var aggregateFunc = Lambda>( - Call(HashCodeAddMethod, aggregateParam, elementComparer.ExtractHashCodeBody(aggregateElementParam)), - aggregateParam, aggregateElementParam); - - var selector = Lambda>( - Call(aggregateParam, ToHashCodeMethod), - aggregateParam); -#pragma warning restore EF1001 // Internal EF Core API usage. - - return Lambda>( - Call( - EnumerableMethods.AggregateWithSeedSelector.MakeGenericMethod(elementType, typeof(HashCode), typeof(int)), - param, - New(typeof(HashCode)), - aggregateFunc, - selector), - param); - } - - private static Expression> CreateSnapshotExpression(ValueComparer elementComparer) - { - var elementType = typeof(TElement); - var param = Parameter(typeof(TElement[]), "v"); - - var elementParam = Parameter(elementType, "e"); - - var selector = elementType.IsValueType - ? elementComparer.SnapshotExpression - : Lambda>( - Condition( - Equal(elementParam, Constant(null, elementType)), - Constant(null, elementType), - elementComparer.ExtractSnapshotBody(elementParam)), - elementParam); - - return Lambda>( - Call( - EnumerableMethods.ToArray.MakeGenericMethod(elementType), - Call( - EnumerableMethods.Select.MakeGenericMethod(elementType, elementType), - param, - selector)), - param); - } -} diff --git a/src/EFCore.Cosmos/Infrastructure/Internal/CosmosModelValidator.cs b/src/EFCore.Cosmos/Infrastructure/Internal/CosmosModelValidator.cs index 8734305b709..1fb048fd995 100644 --- a/src/EFCore.Cosmos/Infrastructure/Internal/CosmosModelValidator.cs +++ b/src/EFCore.Cosmos/Infrastructure/Internal/CosmosModelValidator.cs @@ -41,36 +41,6 @@ public override void Validate(IModel model, IDiagnosticsLogger - protected override void ValidatePrimitiveCollections( - IModel model, - IDiagnosticsLogger logger) - { - foreach (var entityType in model.GetEntityTypes()) - { - Validate(entityType, logger); - } - - static void Validate(ITypeBase typeBase, IDiagnosticsLogger logger) - { - foreach (var property in typeBase.GetDeclaredProperties()) - { - if (property is { IsPrimitiveCollection: true }) - { - throw new InvalidOperationException( - CosmosStrings.PrimitiveCollectionsNotSupported( - property.DeclaringType.ClrType.ShortDisplayName(), - property.Name)); - } - } - - foreach (var complexProperty in typeBase.GetDeclaredComplexProperties()) - { - Validate(complexProperty.ComplexType, logger); - } - } - } - /// /// 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 diff --git a/src/EFCore.Cosmos/Properties/CosmosStrings.Designer.cs b/src/EFCore.Cosmos/Properties/CosmosStrings.Designer.cs index e7561a9f10a..aecd79717d0 100644 --- a/src/EFCore.Cosmos/Properties/CosmosStrings.Designer.cs +++ b/src/EFCore.Cosmos/Properties/CosmosStrings.Designer.cs @@ -309,14 +309,6 @@ public static string PartitionKeyStoreNameMismatch(object? property1, object? en GetString("PartitionKeyStoreNameMismatch", nameof(property1), nameof(entityType1), nameof(storeName1), nameof(property2), nameof(entityType2), nameof(storeName2)), property1, entityType1, storeName1, property2, entityType2, storeName2); - /// - /// The property '{entityType}.{property}' is configured as an EF8 primitive collection. Primitive collections in a Cosmos model are discovered by convention. - /// - public static string PrimitiveCollectionsNotSupported(object? entityType, object? property) - => string.Format( - GetString("PrimitiveCollectionsNotSupported", nameof(entityType), nameof(property)), - entityType, property); - /// /// Unable to execute a 'ReadItem' query since the 'id' value is missing and cannot be generated. /// diff --git a/src/EFCore.Cosmos/Properties/CosmosStrings.resx b/src/EFCore.Cosmos/Properties/CosmosStrings.resx index e5815bbdd9b..0709e132b3a 100644 --- a/src/EFCore.Cosmos/Properties/CosmosStrings.resx +++ b/src/EFCore.Cosmos/Properties/CosmosStrings.resx @@ -263,9 +263,6 @@ The partition key property '{property1}' on '{entityType1}' is mapped as '{storeName1}', but the partition key property '{property2}' on '{entityType2}' is mapped as '{storeName2}'. All partition key properties need to be mapped to the same store property for entity types mapped to the same container. - - The property '{entityType}.{property}' is configured as an EF8 primitive collection. Primitive collections in a Cosmos model are discovered by convention. - Unable to execute a 'ReadItem' query since the 'id' value is missing and cannot be generated. diff --git a/src/EFCore.Cosmos/Storage/Internal/CosmosTypeMappingSource.cs b/src/EFCore.Cosmos/Storage/Internal/CosmosTypeMappingSource.cs index 8f7cc37bd56..b24d1a1fcab 100644 --- a/src/EFCore.Cosmos/Storage/Internal/CosmosTypeMappingSource.cs +++ b/src/EFCore.Cosmos/Storage/Internal/CosmosTypeMappingSource.cs @@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using System.Collections.ObjectModel; using Microsoft.EntityFrameworkCore.Cosmos.ChangeTracking.Internal; using Newtonsoft.Json.Linq; @@ -86,35 +85,9 @@ public CosmosTypeMappingSource(TypeMappingSourceDependencies dependencies) var jsonValueReaderWriter = Dependencies.JsonValueReaderWriterSource.FindReaderWriter(clrType); - if (clrType.IsArray) - { - var elementMappingInfo = new TypeMappingInfo(elementType); - var elementMapping = FindPrimitiveMapping(elementMappingInfo) - ?? FindCollectionMapping(elementMappingInfo); - return elementMapping == null - ? null - : new CosmosTypeMapping( - clrType, CreateArrayComparer(elementMapping, elementType), jsonValueReaderWriter: jsonValueReaderWriter); - } - if (clrType is { IsGenericType: true, IsGenericTypeDefinition: false }) { var genericTypeDefinition = clrType.GetGenericTypeDefinition(); - if (genericTypeDefinition == typeof(List<>) - || genericTypeDefinition == typeof(IList<>) - || genericTypeDefinition == typeof(IReadOnlyList<>) - || genericTypeDefinition == typeof(ObservableCollection<>) - || genericTypeDefinition == typeof(Collection<>)) - { - var elementMappingInfo = new TypeMappingInfo(elementType); - var elementMapping = FindPrimitiveMapping(elementMappingInfo) - ?? FindCollectionMapping(elementMappingInfo); - return elementMapping == null - ? null - : new CosmosTypeMapping( - clrType, CreateListComparer(elementMapping, elementType, clrType), jsonValueReaderWriter: jsonValueReaderWriter); - } - if (genericTypeDefinition == typeof(Dictionary<,>) || genericTypeDefinition == typeof(IDictionary<,>) || genericTypeDefinition == typeof(IReadOnlyDictionary<,>)) @@ -140,33 +113,6 @@ public CosmosTypeMappingSource(TypeMappingSourceDependencies dependencies) return null; } - private static ValueComparer CreateArrayComparer(CoreTypeMapping elementMapping, Type elementType) - { - var unwrappedType = elementType.UnwrapNullableType(); - - return (ValueComparer)Activator.CreateInstance( - elementType == unwrappedType - ? typeof(SingleDimensionalArrayComparer<>).MakeGenericType(elementType) - : typeof(NullableSingleDimensionalArrayComparer<>).MakeGenericType(unwrappedType), - elementMapping.Comparer)!; - } - - private static ValueComparer CreateListComparer( - CoreTypeMapping elementMapping, - Type elementType, - Type listType, - bool readOnly = false) - { - var unwrappedType = elementType.UnwrapNullableType(); - - return (ValueComparer)Activator.CreateInstance( - elementType == unwrappedType - ? typeof(ListComparer<,>).MakeGenericType(elementType, listType) - : typeof(NullableListComparer<,>).MakeGenericType(unwrappedType, listType), - elementMapping.Comparer, - readOnly)!; - } - private static ValueComparer CreateStringDictionaryComparer( CoreTypeMapping elementMapping, Type elementType, diff --git a/src/EFCore.Relational/Storage/RelationalTypeMappingSource.cs b/src/EFCore.Relational/Storage/RelationalTypeMappingSource.cs index 3a685cf279e..224eaa7e9ae 100644 --- a/src/EFCore.Relational/Storage/RelationalTypeMappingSource.cs +++ b/src/EFCore.Relational/Storage/RelationalTypeMappingSource.cs @@ -144,60 +144,64 @@ protected override CoreTypeMapping FindMapping(in TypeMappingInfo mappingInfo) var (mappingInfo, providerClrType, customConverter, elementMapping) = k; var sourceType = mappingInfo.ClrType; - var mapping = providerClrType == null - || providerClrType == mappingInfo.ClrType - ? self.FindMapping(mappingInfo) - : null; + RelationalTypeMapping? mapping = null; - if (mapping == null) + if (providerClrType == null + || providerClrType == mappingInfo.ClrType) { - if (elementMapping == null - || customConverter != null) + mapping = self.FindMapping(mappingInfo); + } + + if (mapping == null + && sourceType != null) + { + if (elementMapping == null) + { + mapping = WithConverter(); + } + + mapping ??= self.FindCollectionMapping(mappingInfo, sourceType, providerClrType, elementMapping) + ?? WithConverter(); + } + + RelationalTypeMapping? WithConverter() + { + foreach (var converterInfo in self.Dependencies + .ValueConverterSelector + .Select(sourceType, providerClrType)) { - if (sourceType != null) + var mappingInfoUsed = mappingInfo.WithConverter(converterInfo); + mapping = self.FindMapping(mappingInfoUsed); + + if (mapping == null + && providerClrType != null) { - foreach (var converterInfo in self.Dependencies + foreach (var secondConverterInfo in self.Dependencies .ValueConverterSelector - .Select(sourceType, providerClrType)) + .Select(providerClrType)) { - var mappingInfoUsed = mappingInfo.WithConverter(converterInfo); - mapping = self.FindMapping(mappingInfoUsed); - - if (mapping == null - && providerClrType != null) - { - foreach (var secondConverterInfo in self.Dependencies - .ValueConverterSelector - .Select(providerClrType)) - { - mapping = self.FindMapping(mappingInfoUsed.WithConverter(secondConverterInfo)); - - if (mapping != null) - { - mapping = (RelationalTypeMapping)mapping.WithComposedConverter( - secondConverterInfo.Create(), - jsonValueReaderWriter: mappingInfoUsed.JsonValueReaderWriter); - break; - } - } - } + mapping = self.FindMapping(mappingInfoUsed.WithConverter(secondConverterInfo)); if (mapping != null) { mapping = (RelationalTypeMapping)mapping.WithComposedConverter( - converterInfo.Create(), - jsonValueReaderWriter: mappingInfo.JsonValueReaderWriter); + secondConverterInfo.Create(), + jsonValueReaderWriter: mappingInfoUsed.JsonValueReaderWriter); break; } } + } - mapping ??= self.FindCollectionMapping(mappingInfo, sourceType, providerClrType, elementMapping); + if (mapping != null) + { + mapping = (RelationalTypeMapping)mapping.WithComposedConverter( + converterInfo.Create(), + jsonValueReaderWriter: mappingInfo.JsonValueReaderWriter); + break; } } - else if (sourceType != null) - { - mapping = self.FindCollectionMapping(mappingInfo, sourceType, providerClrType, elementMapping); - } + + return mapping; } if (mapping != null diff --git a/src/EFCore/ChangeTracking/NullableValueTypeListComparer.cs b/src/EFCore/ChangeTracking/ListOfNullableValueTypesComparer.cs similarity index 80% rename from src/EFCore/ChangeTracking/NullableValueTypeListComparer.cs rename to src/EFCore/ChangeTracking/ListOfNullableValueTypesComparer.cs index 7acbff280f9..ba34d114ee6 100644 --- a/src/EFCore/ChangeTracking/NullableValueTypeListComparer.cs +++ b/src/EFCore/ChangeTracking/ListOfNullableValueTypesComparer.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.ObjectModel; + namespace Microsoft.EntityFrameworkCore.ChangeTracking; /// @@ -9,22 +11,29 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking; /// /// /// -/// This comparer should be used for nullable value types. Use for reference +/// This comparer should be used for nullable value types. Use for reference /// types and non-nullable value types. /// /// /// See EF Core value comparers for more information and examples. /// /// +/// The collection type to create an index of, if needed. /// The element type. -public sealed class NullableValueTypeListComparer : ValueComparer> +public sealed class ListOfNullableValueTypesComparer : ValueComparer> where TElement : struct { + private static readonly bool IsArray = typeof(TConcreteCollection).IsArray; + + private static readonly bool IsReadOnly = IsArray + || (typeof(TConcreteCollection).IsGenericType + && typeof(TConcreteCollection).GetGenericTypeDefinition() == typeof(ReadOnlyCollection<>)); + /// /// Creates a new instance of the list comparer. /// /// The comparer to use for comparing elements. - public NullableValueTypeListComparer(ValueComparer elementComparer) + public ListOfNullableValueTypesComparer(ValueComparer elementComparer) : base( (a, b) => Compare(a, b, (ValueComparer)elementComparer), o => GetHashCode(o, (ValueComparer)elementComparer), @@ -117,10 +126,9 @@ private static int GetHashCode(IEnumerable source, ValueComparer).MakeGenericType(elementComparer.Type.MakeNullable()).ShortDisplayName())); } - if (sourceList.IsReadOnly) + if (IsArray) { var snapshot = new TElement?[sourceList.Count]; - for (var i = 0; i < sourceList.Count; i++) { var instance = sourceList[i]; @@ -131,16 +139,15 @@ private static int GetHashCode(IEnumerable source, ValueComparer || sourceList.IsReadOnly - ? new List(sourceList.Count) - : (IList)Activator.CreateInstance(source.GetType())!; - + var snapshot = IsReadOnly ? new List() : (IList)Activator.CreateInstance()!; foreach (var e in sourceList) { snapshot.Add(e == null ? null : elementComparer.Snapshot(e)); } - return snapshot; + return IsReadOnly + ? (IList)Activator.CreateInstance(typeof(TConcreteCollection), [snapshot])! + : snapshot; } } } diff --git a/src/EFCore/ChangeTracking/ObjectListComparer.cs b/src/EFCore/ChangeTracking/ListOfReferenceTypesComparer.cs similarity index 66% rename from src/EFCore/ChangeTracking/ObjectListComparer.cs rename to src/EFCore/ChangeTracking/ListOfReferenceTypesComparer.cs index 9024b6d97e4..0523dc10006 100644 --- a/src/EFCore/ChangeTracking/ObjectListComparer.cs +++ b/src/EFCore/ChangeTracking/ListOfReferenceTypesComparer.cs @@ -1,6 +1,9 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections; +using System.Collections.ObjectModel; + namespace Microsoft.EntityFrameworkCore.ChangeTracking; /// @@ -15,17 +18,25 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking; /// See EF Core value comparers for more information and examples. /// /// +/// The collection type to create an index of, if needed. /// The element type. -public sealed class ObjectListComparer : ValueComparer> +public sealed class ListOfReferenceTypesComparer : ValueComparer + where TElement : class { + private static readonly bool IsArray = typeof(TConcreteCollection).IsArray; + + private static readonly bool IsReadOnly = IsArray + || (typeof(TConcreteCollection).IsGenericType + && typeof(TConcreteCollection).GetGenericTypeDefinition() == typeof(ReadOnlyCollection<>)); + /// /// Creates a new instance of the list comparer. /// /// The comparer to use for comparing elements. - public ObjectListComparer(ValueComparer elementComparer) + public ListOfReferenceTypesComparer(ValueComparer elementComparer) : base( (a, b) => Compare(a, b, elementComparer), - o => GetHashCode(o, elementComparer), + o => GetHashCode((IEnumerable)o, elementComparer), source => Snapshot(source, elementComparer)) { ElementComparer = elementComparer; @@ -36,7 +47,7 @@ public ObjectListComparer(ValueComparer elementComparer) /// public ValueComparer ElementComparer { get; } - private static bool Compare(IEnumerable? a, IEnumerable? b, ValueComparer elementComparer) + private static bool Compare(object? a, object? b, ValueComparer elementComparer) { if (ReferenceEquals(a, b)) { @@ -53,7 +64,7 @@ private static bool Compare(IEnumerable? a, IEnumerable? b, return false; } - if (a is IList aList && b is IList bList) + if (a is IList aList && b is IList bList) { if (aList.Count != bList.Count) { @@ -93,7 +104,7 @@ private static bool Compare(IEnumerable? a, IEnumerable? b, typeof(IList<>).MakeGenericType(elementComparer.Type).ShortDisplayName())); } - private static int GetHashCode(IEnumerable source, ValueComparer elementComparer) + private static int GetHashCode(IEnumerable source, ValueComparer elementComparer) { var hash = new HashCode(); @@ -105,9 +116,9 @@ private static int GetHashCode(IEnumerable source, ValueComparer eleme return hash.ToHashCode(); } - private static IList Snapshot(IEnumerable source, ValueComparer elementComparer) + private static IList Snapshot(object source, ValueComparer elementComparer) { - if (source is not IList sourceList) + if (source is not IList sourceList) { throw new InvalidOperationException( CoreStrings.BadListType( @@ -115,33 +126,28 @@ private static IList Snapshot(IEnumerable source, ValueCompa typeof(IList<>).MakeGenericType(elementComparer.Type).ShortDisplayName())); } - if (sourceList.IsReadOnly) + if (IsArray) { - var snapshot = new TElement[sourceList.Count]; - + var snapshot = new TElement?[sourceList.Count]; for (var i = 0; i < sourceList.Count; i++) { var instance = sourceList[i]; - if (instance != null) - { - snapshot[i] = (TElement)elementComparer.Snapshot(instance); - } + snapshot[i] = instance == null ? null : (TElement?)elementComparer.Snapshot(instance); } return snapshot; } else { - var snapshot = (source is List || sourceList.IsReadOnly) - ? new List(sourceList.Count) - : (IList)Activator.CreateInstance(source.GetType())!; - + var snapshot = IsReadOnly ? new List() : (IList)Activator.CreateInstance()!; foreach (var e in sourceList) { - snapshot.Add(e == null ? (TElement)(object?)null! : (TElement)elementComparer.Snapshot(e)); + snapshot.Add(e == null ? null : (TElement?)elementComparer.Snapshot(e)); } - return snapshot; + return IsReadOnly + ? (IList)Activator.CreateInstance(typeof(TConcreteCollection), [snapshot])! + : snapshot; } } } diff --git a/src/EFCore/ChangeTracking/ListComparer.cs b/src/EFCore/ChangeTracking/ListOfValueTypesComparer.cs similarity index 73% rename from src/EFCore/ChangeTracking/ListComparer.cs rename to src/EFCore/ChangeTracking/ListOfValueTypesComparer.cs index d64272f8079..8ec353b7982 100644 --- a/src/EFCore/ChangeTracking/ListComparer.cs +++ b/src/EFCore/ChangeTracking/ListOfValueTypesComparer.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.ObjectModel; + namespace Microsoft.EntityFrameworkCore.ChangeTracking; /// @@ -10,20 +12,28 @@ namespace Microsoft.EntityFrameworkCore.ChangeTracking; /// /// /// This comparer should be used for reference types and non-nullable value types. Use -/// for nullable value types. +/// for nullable value types. /// /// /// See EF Core value comparers for more information and examples. /// /// +/// The collection type to create an index of, if needed. /// The element type. -public sealed class ListComparer : ValueComparer> +public sealed class ListOfValueTypesComparer : ValueComparer> + where TElement : struct { + private static readonly bool IsArray = typeof(TConcreteCollection).IsArray; + + private static readonly bool IsReadOnly = IsArray + || (typeof(TConcreteCollection).IsGenericType + && typeof(TConcreteCollection).GetGenericTypeDefinition() == typeof(ReadOnlyCollection<>)); + /// /// Creates a new instance of the list comparer. /// /// The comparer to use for comparing elements. - public ListComparer(ValueComparer elementComparer) + public ListOfValueTypesComparer(ValueComparer elementComparer) : base( (a, b) => Compare(a, b, (ValueComparer)elementComparer), o => GetHashCode(o, (ValueComparer)elementComparer), @@ -64,21 +74,6 @@ private static bool Compare(IEnumerable? a, IEnumerable? b, for (var i = 0; i < aList.Count; i++) { var (el1, el2) = (aList[i], bList[i]); - if (el1 is null) - { - if (el2 is null) - { - continue; - } - - return false; - } - - if (el2 is null) - { - return false; - } - if (!elementComparer.Equals(el1, el2)) { return false; @@ -100,7 +95,7 @@ private static int GetHashCode(IEnumerable source, ValueComparer Snapshot(IEnumerable source, ValueCompa throw new InvalidOperationException( CoreStrings.BadListType( source.GetType().ShortDisplayName(), - typeof(IList<>).MakeGenericType(elementComparer.Type).ShortDisplayName())); + typeof(IList<>).MakeGenericType(elementComparer.Type.MakeNullable()).ShortDisplayName())); } - if (sourceList.IsReadOnly) + if (IsArray) { var snapshot = new TElement[sourceList.Count]; - for (var i = 0; i < sourceList.Count; i++) { var instance = sourceList[i]; - if (instance != null) - { - snapshot[i] = elementComparer.Snapshot(instance); - } + snapshot[i] = elementComparer.Snapshot(instance); } return snapshot; } else { - var snapshot = (source is List || sourceList.IsReadOnly) - ? new List(sourceList.Count) - : (IList)Activator.CreateInstance(source.GetType())!; - + var snapshot = IsReadOnly ? new List() : (IList)Activator.CreateInstance()!; foreach (var e in sourceList) { - snapshot.Add(e == null ? (TElement)(object)null! : elementComparer.Snapshot(e)); + snapshot.Add(elementComparer.Snapshot(e)); } - return snapshot; + return IsReadOnly + ? (IList)Activator.CreateInstance(typeof(TConcreteCollection), [snapshot])! + : snapshot; } } } diff --git a/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGenerator.cs b/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGenerator.cs index ffd417abded..9502298b15d 100644 --- a/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGenerator.cs +++ b/src/EFCore/Design/Internal/CSharpRuntimeAnnotationCodeGenerator.cs @@ -418,7 +418,7 @@ public static void Create( var mainBuilder = parameters.MainBuilder; var constructor = comparer.GetType().GetDeclaredConstructor([typeof(ValueComparer)]); - var elementComparerProperty = comparer.GetType().GetProperty(nameof(ListComparer.ElementComparer)); + var elementComparerProperty = comparer.GetType().GetProperty(nameof(ListOfValueTypesComparer.ElementComparer)); if (constructor == null || elementComparerProperty == null) { diff --git a/src/EFCore/Infrastructure/ModelValidator.cs b/src/EFCore/Infrastructure/ModelValidator.cs index 49601b9d34c..6e197815ce7 100644 --- a/src/EFCore/Infrastructure/ModelValidator.cs +++ b/src/EFCore/Infrastructure/ModelValidator.cs @@ -1035,13 +1035,6 @@ static void Validate(ITypeBase typeBase, IDiagnosticsLogger).MakeGenericType(elementClrType!).ShortDisplayName())); } - - if (property.ClrType.IsGenericType - && (property.ClrType.GetGenericTypeDefinition() == typeof(IReadOnlyCollection<>) - || property.ClrType.GetGenericTypeDefinition() == typeof(IReadOnlyList<>))) - { - throw new InvalidOperationException(CoreStrings.ReadOnlyListType(property.ClrType.ShortDisplayName())); - } } } diff --git a/src/EFCore/Properties/CoreStrings.Designer.cs b/src/EFCore/Properties/CoreStrings.Designer.cs index 12a35ead3e1..6cde3b34aa4 100644 --- a/src/EFCore/Properties/CoreStrings.Designer.cs +++ b/src/EFCore/Properties/CoreStrings.Designer.cs @@ -2605,14 +2605,6 @@ public static string QueryUnhandledQueryRootExpression(object? type) GetString("QueryUnhandledQueryRootExpression", nameof(type)), type); - /// - /// The type '{givenType}' cannot be used as a primitive collection because it is read-only. Read-only collections of primitive types are not supported. - /// - public static string ReadOnlyListType(object? givenType) - => string.Format( - GetString("ReadOnlyListType", nameof(givenType)), - givenType); - /// /// An attempt was made to use the context instance while it is being configured. A DbContext instance cannot be used inside 'OnConfiguring' since it is still being configured at this point. This can happen if a second operation is started on this context instance before a previous operation completed. Any instance members are not guaranteed to be thread safe. /// diff --git a/src/EFCore/Properties/CoreStrings.resx b/src/EFCore/Properties/CoreStrings.resx index 1ae11dc6547..b1f71053ae5 100644 --- a/src/EFCore/Properties/CoreStrings.resx +++ b/src/EFCore/Properties/CoreStrings.resx @@ -1,17 +1,17 @@  - @@ -1435,9 +1435,6 @@ Query root of type '{type}' wasn't handled by provider code. This issue happens when using a provider specific method on a different provider where it is not supported. - - The type '{givenType}' cannot be used as a primitive collection because it is read-only. Read-only collections of primitive types are not supported. - An attempt was made to use the context instance while it is being configured. A DbContext instance cannot be used inside 'OnConfiguring' since it is still being configured at this point. This can happen if a second operation is started on this context instance before a previous operation completed. Any instance members are not guaranteed to be thread safe. diff --git a/src/EFCore/Query/Internal/EntityMaterializerSource.cs b/src/EFCore/Query/Internal/EntityMaterializerSource.cs index a4046b3b6e8..3cdeb4fab30 100644 --- a/src/EFCore/Query/Internal/EntityMaterializerSource.cs +++ b/src/EFCore/Query/Internal/EntityMaterializerSource.cs @@ -173,27 +173,35 @@ static Expression CreateMemberAssignment(Expression parameter, MemberInfo member { if (property is IProperty { IsPrimitiveCollection: true, ClrType.IsArray: false }) { - var genericMethod = PopulateListMethod.MakeGenericMethod( - property.ClrType.TryGetElementType(typeof(IEnumerable<>))!); - var currentVariable = Expression.Variable(property.ClrType); - var convertedVariable = genericMethod.GetParameters()[1].ParameterType.IsAssignableFrom(currentVariable.Type) - ? (Expression)currentVariable - : Expression.Convert(currentVariable, genericMethod.GetParameters()[1].ParameterType); - return Expression.Block( - new[] { currentVariable }, - Expression.Assign( - currentVariable, - Expression.MakeMemberAccess(parameter, property.GetMemberInfo(forMaterialization: true, forSet: false))), - Expression.IfThenElse( - Expression.OrElse( - Expression.ReferenceEqual(currentVariable, Expression.Constant(null)), - Expression.ReferenceEqual(value, Expression.Constant(null))), - Expression.MakeMemberAccess(parameter, memberInfo).Assign(value), - Expression.Call( - genericMethod, - value, - convertedVariable) - )); + var elementType = property.ClrType.TryGetElementType(typeof(IEnumerable<>))!; + var iCollectionInterface = typeof(ICollection<>).MakeGenericType(elementType); + if (iCollectionInterface.IsAssignableFrom(property.ClrType)) + { + var genericMethod = PopulateListMethod.MakeGenericMethod(elementType); + var currentVariable = Expression.Variable(property.ClrType); + var convertedVariable = genericMethod.GetParameters()[1].ParameterType.IsAssignableFrom(currentVariable.Type) + ? (Expression)currentVariable + : Expression.Convert(currentVariable, genericMethod.GetParameters()[1].ParameterType); + return Expression.Block( + new[] { currentVariable }, + Expression.Assign( + currentVariable, + Expression.MakeMemberAccess(parameter, property.GetMemberInfo(forMaterialization: true, forSet: false))), + Expression.IfThenElse( + Expression.OrElse( + Expression.OrElse( + Expression.ReferenceEqual(currentVariable, Expression.Constant(null)), + Expression.ReferenceEqual(value, Expression.Constant(null))), + Expression.MakeMemberAccess( + currentVariable, + iCollectionInterface.GetProperty(nameof(ICollection.IsReadOnly))!)), + Expression.MakeMemberAccess(parameter, memberInfo).Assign(value), + Expression.Call( + genericMethod, + value, + convertedVariable) + )); + } } return property.IsIndexerProperty() diff --git a/src/EFCore/Storage/Json/JsonNullableStructCollectionReaderWriter.cs b/src/EFCore/Storage/Json/JsonCollectionOfNullableStructsReaderWriter.cs similarity index 82% rename from src/EFCore/Storage/Json/JsonNullableStructCollectionReaderWriter.cs rename to src/EFCore/Storage/Json/JsonCollectionOfNullableStructsReaderWriter.cs index 26a81959b4b..cac740b68fc 100644 --- a/src/EFCore/Storage/Json/JsonNullableStructCollectionReaderWriter.cs +++ b/src/EFCore/Storage/Json/JsonCollectionOfNullableStructsReaderWriter.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.ObjectModel; using System.Text.Json; using Microsoft.EntityFrameworkCore.Storage.Internal; @@ -9,22 +10,26 @@ namespace Microsoft.EntityFrameworkCore.Storage.Json; /// /// A for collections of primitives nullable value types. /// -/// The collection type. /// The collection type to create an index of, if needed. /// The element type. -public class JsonNullableStructCollectionReaderWriter : +public class JsonCollectionOfNullableStructsReaderWriter : JsonValueReaderWriter>, ICompositeJsonValueReaderWriter where TElement : struct - where TCollection : IEnumerable { private readonly JsonValueReaderWriter _elementReaderWriter; + private static readonly bool IsArray = typeof(TConcreteCollection).IsArray; + + private static readonly bool IsReadOnly = IsArray + || (typeof(TConcreteCollection).IsGenericType + && typeof(TConcreteCollection).GetGenericTypeDefinition() == typeof(ReadOnlyCollection<>)); + /// /// Creates a new instance of this collection reader/writer, using the given reader/writer for its elements. /// /// The reader/writer to use for each element. - public JsonNullableStructCollectionReaderWriter(JsonValueReaderWriter elementReaderWriter) + public JsonCollectionOfNullableStructsReaderWriter(JsonValueReaderWriter elementReaderWriter) { _elementReaderWriter = elementReaderWriter; } @@ -33,7 +38,7 @@ public JsonNullableStructCollectionReaderWriter(JsonValueReaderWriter public override IEnumerable FromJsonTyped(ref Utf8JsonReaderManager manager, object? existingObject = null) { IList collection; - if (typeof(TCollection).IsArray) + if (IsReadOnly) { collection = new List(); } @@ -89,7 +94,11 @@ public JsonNullableStructCollectionReaderWriter(JsonValueReaderWriter } } - return typeof(TCollection).IsArray ? collection.ToArray() : collection; + return IsReadOnly + ? IsArray + ? collection.ToArray() + : (IList)Activator.CreateInstance(typeof(TConcreteCollection), [collection])! + : collection; } /// diff --git a/src/EFCore/Storage/Json/JsonCollectionOfReferencesReaderWriter.cs b/src/EFCore/Storage/Json/JsonCollectionOfReferencesReaderWriter.cs new file mode 100644 index 00000000000..6cb96b7b647 --- /dev/null +++ b/src/EFCore/Storage/Json/JsonCollectionOfReferencesReaderWriter.cs @@ -0,0 +1,123 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.ObjectModel; +using System.Text.Json; +using Microsoft.EntityFrameworkCore.Storage.Internal; + +namespace Microsoft.EntityFrameworkCore.Storage.Json; + +/// +/// A for collections of primitive elements that are reference types. />. +/// +/// The collection type to create an index of, if needed. +/// The element type. +public class JsonCollectionOfReferencesReaderWriter : + JsonValueReaderWriter, + ICompositeJsonValueReaderWriter + where TElement : class? +{ + private readonly JsonValueReaderWriter _elementReaderWriter; + + private static readonly bool IsArray = typeof(TConcreteCollection).IsArray; + + private static readonly bool IsReadOnly = IsArray + || (typeof(TConcreteCollection).IsGenericType + && typeof(TConcreteCollection).GetGenericTypeDefinition() == typeof(ReadOnlyCollection<>)); + + /// + /// Creates a new instance of this collection reader/writer, using the given reader/writer for its elements. + /// + /// The reader/writer to use for each element. + public JsonCollectionOfReferencesReaderWriter(JsonValueReaderWriter elementReaderWriter) + { + _elementReaderWriter = elementReaderWriter; + } + + /// + public override object FromJsonTyped(ref Utf8JsonReaderManager manager, object? existingObject = null) + { + IList collection; + if (IsReadOnly) + { + collection = new List(); + } + else if (existingObject == null) + { + collection = (IList)Activator.CreateInstance()!; + } + else + { + collection = (IList)existingObject; + collection.Clear(); + } + + var tokenType = manager.CurrentReader.TokenType; + if (tokenType != JsonTokenType.StartArray) + { + throw new InvalidOperationException( + CoreStrings.JsonReaderInvalidTokenType(tokenType.ToString())); + } + + while (tokenType != JsonTokenType.EndArray) + { + manager.MoveNext(); + tokenType = manager.CurrentReader.TokenType; + + switch (tokenType) + { + case JsonTokenType.String: + case JsonTokenType.Number: + case JsonTokenType.True: + case JsonTokenType.False: + case JsonTokenType.StartArray: + collection.Add((TElement)_elementReaderWriter.FromJson(ref manager)); + break; + case JsonTokenType.Null: + collection.Add(default); + break; + case JsonTokenType.Comment: + case JsonTokenType.EndArray: + break; + case JsonTokenType.None: // Explicitly listing all states that we throw for + case JsonTokenType.StartObject: + case JsonTokenType.EndObject: + case JsonTokenType.PropertyName: + default: + throw new InvalidOperationException( + CoreStrings.JsonReaderInvalidTokenType(tokenType.ToString())); + } + } + + return IsReadOnly + ? IsArray + ? collection.ToArray() + : (IList)Activator.CreateInstance(typeof(TConcreteCollection), [collection])! + : collection; + } + + /// + public override void ToJsonTyped(Utf8JsonWriter writer, object? value) + { + writer.WriteStartArray(); + if (value != null) + { + foreach (var element in (IEnumerable)value) + { + if (element == null) + { + writer.WriteNullValue(); + } + else + { + _elementReaderWriter.ToJson(writer, element); + } + } + } + + writer.WriteEndArray(); + } + + JsonValueReaderWriter ICompositeJsonValueReaderWriter.InnerReaderWriter + => _elementReaderWriter; +} diff --git a/src/EFCore/Storage/Json/JsonCollectionReaderWriter.cs b/src/EFCore/Storage/Json/JsonCollectionOfStructsReaderWriter.cs similarity index 67% rename from src/EFCore/Storage/Json/JsonCollectionReaderWriter.cs rename to src/EFCore/Storage/Json/JsonCollectionOfStructsReaderWriter.cs index f1fbc43d1e4..9f2c1722859 100644 --- a/src/EFCore/Storage/Json/JsonCollectionReaderWriter.cs +++ b/src/EFCore/Storage/Json/JsonCollectionOfStructsReaderWriter.cs @@ -1,48 +1,55 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Collections.ObjectModel; using System.Text.Json; using Microsoft.EntityFrameworkCore.Storage.Internal; namespace Microsoft.EntityFrameworkCore.Storage.Json; /// -/// A for collections of primitive elements that are a not . +/// A for collections of primitive elements that are a not reference types and not +/// . /// -/// The collection type. /// The collection type to create an index of, if needed. /// The element type. -public class JsonCollectionReaderWriter : - JsonValueReaderWriter>, +public class JsonCollectionOfStructsReaderWriter : + JsonValueReaderWriter>, ICompositeJsonValueReaderWriter - where TCollection : IEnumerable + where TElement : struct { private readonly JsonValueReaderWriter _elementReaderWriter; + private static readonly bool IsArray = typeof(TConcreteCollection).IsArray; + + private static readonly bool IsReadOnly = IsArray + || (typeof(TConcreteCollection).IsGenericType + && typeof(TConcreteCollection).GetGenericTypeDefinition() == typeof(ReadOnlyCollection<>)); + /// /// Creates a new instance of this collection reader/writer, using the given reader/writer for its elements. /// /// The reader/writer to use for each element. - public JsonCollectionReaderWriter(JsonValueReaderWriter elementReaderWriter) + public JsonCollectionOfStructsReaderWriter(JsonValueReaderWriter elementReaderWriter) { _elementReaderWriter = elementReaderWriter; } /// - public override IEnumerable FromJsonTyped(ref Utf8JsonReaderManager manager, object? existingObject = null) + public override IEnumerable FromJsonTyped(ref Utf8JsonReaderManager manager, object? existingObject = null) { - IList collection; - if (typeof(TCollection).IsArray) + IList collection; + if (IsReadOnly) { - collection = new List(); + collection = new List(); } else if (existingObject == null) { - collection = (IList)Activator.CreateInstance()!; + collection = (IList)Activator.CreateInstance()!; } else { - collection = (IList)existingObject; + collection = (IList)existingObject; collection.Clear(); } @@ -83,23 +90,20 @@ public JsonCollectionReaderWriter(JsonValueReaderWriter elementReaderW } } - return typeof(TCollection).IsArray ? collection.ToArray() : collection; + return IsReadOnly + ? IsArray + ? collection.ToArray() + : (IList)Activator.CreateInstance(typeof(TConcreteCollection), [collection])! + : collection; } /// - public override void ToJsonTyped(Utf8JsonWriter writer, IEnumerable value) + public override void ToJsonTyped(Utf8JsonWriter writer, IEnumerable value) { writer.WriteStartArray(); foreach (var element in value) { - if (element == null) - { - writer.WriteNullValue(); - } - else - { - _elementReaderWriter.ToJsonTyped(writer, element); - } + _elementReaderWriter.ToJsonTyped(writer, element); } writer.WriteEndArray(); diff --git a/src/EFCore/Storage/TypeMappingSource.cs b/src/EFCore/Storage/TypeMappingSource.cs index 7e78f237e0b..3ab4630fd68 100644 --- a/src/EFCore/Storage/TypeMappingSource.cs +++ b/src/EFCore/Storage/TypeMappingSource.cs @@ -100,62 +100,68 @@ protected TypeMappingSource(TypeMappingSourceDependencies dependencies) var (mappingInfo, providerClrType, customConverter, elementMapping) = k; var sourceType = mappingInfo.ClrType; - var mapping = providerClrType == null - || providerClrType == mappingInfo.ClrType - ? self.FindMapping(mappingInfo) - : null; + CoreTypeMapping? mapping = null; - if (mapping == null) + if (providerClrType == null + || providerClrType == mappingInfo.ClrType) { - if (elementMapping == null - || customConverter != null) + mapping = self.FindMapping(mappingInfo); + } + + if (mapping == null + && sourceType != null) + { + if (elementMapping == null) + { + mapping = WithConverter(); + } + + mapping ??= self.FindCollectionMapping(mappingInfo, sourceType, providerClrType, elementMapping) + ?? WithConverter(); + } + + + CoreTypeMapping? WithConverter() + { + foreach (var converterInfo in self.Dependencies + .ValueConverterSelector + .Select(sourceType, providerClrType)) { - if (sourceType != null) + var mappingInfoUsed = mappingInfo.WithConverter(converterInfo); + mapping = self.FindMapping(mappingInfoUsed); + + if (mapping == null + && providerClrType != null) { - foreach (var converterInfo in self.Dependencies + foreach (var secondConverterInfo in self.Dependencies .ValueConverterSelector - .Select(sourceType, providerClrType)) + .Select(providerClrType)) { - var mappingInfoUsed = mappingInfo.WithConverter(converterInfo); - mapping = self.FindMapping(mappingInfoUsed); - - if (mapping == null - && providerClrType != null) - { - foreach (var secondConverterInfo in self.Dependencies - .ValueConverterSelector - .Select(providerClrType)) - { - mapping = self.FindMapping(mappingInfoUsed.WithConverter(secondConverterInfo)); - - if (mapping != null) - { - mapping = mapping.WithComposedConverter( - secondConverterInfo.Create(), - jsonValueReaderWriter: mappingInfoUsed.JsonValueReaderWriter); - break; - } - } - } + mapping = self.FindMapping(mappingInfoUsed.WithConverter(secondConverterInfo)); if (mapping != null) { mapping = mapping.WithComposedConverter( - converterInfo.Create(), - jsonValueReaderWriter: mappingInfo.JsonValueReaderWriter); + secondConverterInfo.Create(), + jsonValueReaderWriter: mappingInfoUsed.JsonValueReaderWriter); break; } } + } - mapping ??= self.FindCollectionMapping(mappingInfo, sourceType, providerClrType, elementMapping); + if (mapping != null) + { + mapping = mapping.WithComposedConverter( + converterInfo.Create(), + jsonValueReaderWriter: mappingInfo.JsonValueReaderWriter); + break; } } - else if (sourceType != null) - { - mapping = self.FindCollectionMapping(mappingInfo, sourceType, providerClrType, elementMapping); - } + + return mapping; } + if (mapping != null && customConverter != null) { diff --git a/src/EFCore/Storage/TypeMappingSourceBase.cs b/src/EFCore/Storage/TypeMappingSourceBase.cs index 94740285a43..d70815043f3 100644 --- a/src/EFCore/Storage/TypeMappingSourceBase.cs +++ b/src/EFCore/Storage/TypeMappingSourceBase.cs @@ -152,7 +152,7 @@ protected virtual bool TryFindJsonCollectionMapping( { elementMapping ??= FindMapping(elementType); - if (elementMapping is { ElementTypeMapping: null, JsonValueReaderWriter: not null }) + if (elementMapping is { JsonValueReaderWriter: not null }) { var elementReader = elementMapping.JsonValueReaderWriter!; @@ -168,17 +168,19 @@ protected virtual bool TryFindJsonCollectionMapping( collectionReaderWriter = mappingInfo.JsonValueReaderWriter ?? (JsonValueReaderWriter?)Activator.CreateInstance( (elementType.IsNullableValueType() - ? typeof(JsonNullableStructCollectionReaderWriter<,,>) - : typeof(JsonCollectionReaderWriter<,,>)) - .MakeGenericType(modelClrType, typeToInstantiate, elementType.UnwrapNullableType()), + ? typeof(JsonCollectionOfNullableStructsReaderWriter<,>) + : elementType.IsValueType + ? typeof(JsonCollectionOfStructsReaderWriter<,>) + : typeof(JsonCollectionOfReferencesReaderWriter<,>)) + .MakeGenericType(typeToInstantiate, elementType.UnwrapNullableType()), elementReader); elementComparer = (ValueComparer?)Activator.CreateInstance( elementType.IsNullableValueType() - ? typeof(NullableValueTypeListComparer<>).MakeGenericType(elementType.UnwrapNullableType()) - : elementMapping.Comparer.Type.IsAssignableFrom(elementType) - ? typeof(ListComparer<>).MakeGenericType(elementType) - : typeof(ObjectListComparer<>).MakeGenericType(elementType), + ? typeof(ListOfNullableValueTypesComparer<,>).MakeGenericType(typeToInstantiate, elementType.UnwrapNullableType()) + : elementType.IsValueType + ? typeof(ListOfValueTypesComparer<,>).MakeGenericType(typeToInstantiate, elementType) + : typeof(ListOfReferenceTypesComparer<,>).MakeGenericType(typeToInstantiate, elementType), elementMapping.Comparer.ToNullableComparer(elementType)!); return true; diff --git a/test/EFCore.Cosmos.FunctionalTests/EndToEndCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/EndToEndCosmosTest.cs index 8041257d809..22a5d9db84b 100644 --- a/test/EFCore.Cosmos.FunctionalTests/EndToEndCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/EndToEndCosmosTest.cs @@ -3,7 +3,6 @@ using System.Collections.Immutable; using Microsoft.Azure.Cosmos; -using Microsoft.EntityFrameworkCore.Cosmos.ChangeTracking.Internal; using Microsoft.EntityFrameworkCore.Cosmos.Internal; using Newtonsoft.Json.Linq; @@ -794,23 +793,18 @@ await Can_add_update_delete_with_collection>( // See #25343 await Can_add_update_delete_with_collection( [ - EntityType.Base, - EntityType.Derived, - EntityType.Derived + Discriminator.Base, + Discriminator.Derived, + Discriminator.Derived ], c => { c.Collection.Clear(); - c.Collection.Add(EntityType.Base); + c.Collection.Add(Discriminator.Base); }, - new List { EntityType.Base }, - modelBuilder => modelBuilder.Entity>>( - c => - c.Property(s => s.Collection) - .HasConversion( - m => m.Select(v => (int)v).ToList(), p => p.Select(v => (EntityType)v).ToList(), - new ListComparer>( - ValueComparer.CreateDefault(typeof(EntityType), false), readOnly: false)))); + new List { Discriminator.Base }, + modelBuilder => modelBuilder.Entity>>( + c => c.PrimitiveCollection(s => s.Collection))); await Can_add_update_delete_with_collection( [1f, 2], @@ -866,6 +860,7 @@ await Can_add_update_delete_with_collection( c.Collection.Add([3]); }, new List> { new() { 3 } }); + await Can_add_update_delete_with_collection>( new List(), c => @@ -874,13 +869,16 @@ await Can_add_update_delete_with_collection( c.Collection.Add(null); }, new List { new byte?[] { 3, null }, null }); - await Can_add_update_delete_with_collection>>( - new Dictionary[] { new() { { "1", null } } }, - c => - { - var dictionary = c.Collection[0]["3"] = "2"; - }, - new List> { new() { { "1", null }, { "3", "2" } } }); + + // TODO: Dictionary mapping Issue #29825 + // await Can_add_update_delete_with_collection>>( + // new Dictionary[] { new() { { "1", null } } }, + // c => + // { + // var dictionary = c.Collection[0]["3"] = "2"; + // }, + // new List> { new() { { "1", null }, { "3", "2" } } }, + // onModelBuilder: b => b.Entity>>>().PrimitiveCollection(e => e.Collection)); await Can_add_update_delete_with_collection( [[1f], [2]], @@ -898,22 +896,24 @@ await Can_add_update_delete_with_collection( }, new[] { new decimal?[] { 1, 3 } }); - await Can_add_update_delete_with_collection( - new Dictionary> { { "1", [1] } }, - c => - { - c.Collection["2"] = [3]; - }, - new Dictionary> { { "1", [1] }, { "2", [3] } }); - - await Can_add_update_delete_with_collection>( - new SortedDictionary { { "2", [2] }, { "1", [1] } }, - c => - { - c.Collection.Clear(); - c.Collection["2"] = null; - }, - new SortedDictionary { { "2", null } }); + // TODO: Dictionary mapping Issue #29825 + // await Can_add_update_delete_with_collection( + // new Dictionary> { { "1", [1] } }, + // c => + // { + // c.Collection["2"] = [3]; + // }, + // new Dictionary> { { "1", [1] }, { "2", [3] } }); + + // TODO: Dictionary mapping Issue #29825 + // await Can_add_update_delete_with_collection>( + // new SortedDictionary { { "2", [2] }, { "1", [1] } }, + // c => + // { + // c.Collection.Clear(); + // c.Collection["2"] = null; + // }, + // new SortedDictionary { { "2", null } }); await Can_add_update_delete_with_collection>>( ImmutableDictionary>.Empty @@ -1863,7 +1863,7 @@ public async Task Can_have_non_string_property_named_Discriminator(bool useDiscr { b.Entity() .HasDiscriminator(m => m.Discriminator) - .HasValue(EntityType.Base); + .HasValue(Discriminator.Base); } else { @@ -1912,7 +1912,7 @@ OFFSET 0 LIMIT 1 ListLoggerFactory.Clear(); Assert.Equal( baseEntity, await context.Set() - .Where(e => e.Discriminator == EntityType.Base).OrderBy(e => e.Id).FirstOrDefaultAsync()); + .Where(e => e.Discriminator == Discriminator.Base).OrderBy(e => e.Id).FirstOrDefaultAsync()); if (useDiscriminator) { @@ -2001,10 +2001,10 @@ OFFSET 0 LIMIT 1 private class NonStringDiscriminator { public int Id { get; set; } - public EntityType Discriminator { get; set; } + public Discriminator Discriminator { get; set; } } - private enum EntityType + private enum Discriminator { Base, Derived diff --git a/test/EFCore.Cosmos.FunctionalTests/JsonTypesCosmosTest.cs b/test/EFCore.Cosmos.FunctionalTests/JsonTypesCosmosTest.cs index 0de9b43cc0c..62e4c4488bb 100644 --- a/test/EFCore.Cosmos.FunctionalTests/JsonTypesCosmosTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/JsonTypesCosmosTest.cs @@ -1,224 +1,12 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -using Xunit.Sdk; - namespace Microsoft.EntityFrameworkCore; public class JsonTypesCosmosTest : JsonTypesTestBase { - // #25765 - the Cosmos type mapping source doesn't support primitive collections, so we end up with a Property - // that has no ElementType; that causes the assertion on the element nullability to fail. - public override Task Can_read_write_collection_of_string_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_string_JSON_values); - - // #25765 - the Cosmos type mapping source doesn't support primitive collections, so we end up with a Property - // that has no ElementType; that causes the assertion on the element nullability to fail. - public override Task Can_read_write_collection_of_binary_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_binary_JSON_values); - - // #25765 - the Cosmos type mapping source doesn't support primitive collections, so we end up with a Property - // that has no ElementType; that causes the assertion on the element nullability to fail. - public override Task Can_read_write_collection_of_nullable_string_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_string_JSON_values); - - public override Task Can_read_write_binary_as_collection() - => Assert.ThrowsAsync(base.Can_read_write_binary_as_collection); - - public override Task Can_read_write_collection_of_bool_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_bool_JSON_values); - - public override Task Can_read_write_collection_of_byte_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_byte_enum_JSON_values); - - public override Task Can_read_write_collection_of_byte_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_byte_JSON_values); - - public override Task Can_read_write_collection_of_char_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_char_JSON_values); - - public override Task Can_read_write_collection_of_DateOnly_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_DateOnly_JSON_values); - - public override Task Can_read_write_collection_of_DateTime_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_DateTime_JSON_values); - - public override Task Can_read_write_collection_of_DateTimeOffset_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_DateTimeOffset_JSON_values); - - public override Task Can_read_write_collection_of_decimal_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_decimal_JSON_values); - - public override Task Can_read_write_collection_of_decimal_with_precision_and_scale_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_decimal_with_precision_and_scale_JSON_values); - - public override Task Can_read_write_collection_of_double_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_double_JSON_values); - - public override Task Can_read_write_collection_of_float_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_float_JSON_values); - - public override Task Can_read_write_collection_of_Guid_converted_to_bytes_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_Guid_converted_to_bytes_JSON_values); - - public override Task Can_read_write_collection_of_GUID_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_GUID_JSON_values); - - public override Task Can_read_write_collection_of_int_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_int_enum_JSON_values); - - public override Task Can_read_write_collection_of_int_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_int_JSON_values); - - public override Task Can_read_write_collection_of_int_with_converter_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_int_with_converter_JSON_values); - - public override Task Can_read_write_collection_of_long_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_long_enum_JSON_values); - - public override Task Can_read_write_collection_of_long_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_long_JSON_values); - - public override Task Can_read_write_collection_of_nullable_binary_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_binary_JSON_values); - - public override Task Can_read_write_collection_of_nullable_bool_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_bool_JSON_values); - - public override Task Can_read_write_collection_of_nullable_byte_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_byte_enum_JSON_values); - - public override Task Can_read_write_collection_of_nullable_byte_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_byte_JSON_values); - - public override Task Can_read_write_collection_of_nullable_char_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_char_JSON_values); - - public override Task Can_read_write_collection_of_nullable_DateOnly_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_DateOnly_JSON_values); - - public override Task Can_read_write_collection_of_nullable_DateTime_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_DateTime_JSON_values); - - public override Task Can_read_write_collection_of_nullable_DateTimeOffset_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_DateTimeOffset_JSON_values); - - public override Task Can_read_write_collection_of_nullable_decimal_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_decimal_JSON_values); - - public override Task Can_read_write_collection_of_nullable_double_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_double_JSON_values); - - public override Task Can_read_write_collection_of_nullable_float_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_float_JSON_values); - - public override Task Can_read_write_collection_of_nullable_GUID_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_GUID_JSON_values); - - public override Task Can_read_write_collection_of_nullable_int_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_int_enum_JSON_values); - - public override Task Can_read_write_collection_of_nullable_int_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_int_JSON_values); - - public override Task Can_read_write_collection_of_ushort_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_ushort_JSON_values); - - public override Task Can_read_write_collection_of_ushort_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_ushort_enum_JSON_values); - - public override Task Can_read_write_collection_of_URI_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_URI_JSON_values); - - public override Task Can_read_write_collection_of_ulong_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_ulong_JSON_values); - - public override Task Can_read_write_collection_of_ulong_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_ulong_enum_JSON_values); - - public override Task Can_read_write_collection_of_uint_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_uint_JSON_values); - - public override Task Can_read_write_collection_of_uint_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_uint_enum_JSON_values); - - public override Task Can_read_write_collection_of_TimeSpan_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_TimeSpan_JSON_values); - - public override Task Can_read_write_collection_of_TimeOnly_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_TimeOnly_JSON_values); - - public override Task Can_read_write_collection_of_short_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_short_JSON_values); - - public override Task Can_read_write_collection_of_short_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_short_enum_JSON_values); - - public override Task Can_read_write_collection_of_sbyte_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_sbyte_JSON_values); - - public override Task Can_read_write_collection_of_sbyte_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_sbyte_enum_JSON_values); - - public override Task Can_read_write_collection_of_physical_address_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_physical_address_JSON_values); - - public override Task Can_read_write_collection_of_nullable_ushort_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_ushort_JSON_values); - - public override Task Can_read_write_collection_of_nullable_ushort_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_ushort_enum_JSON_values); - - public override Task Can_read_write_collection_of_nullable_URI_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_URI_JSON_values); - - public override Task Can_read_write_collection_of_nullable_ulong_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_ulong_JSON_values); - - public override Task Can_read_write_collection_of_nullable_ulong_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_ulong_enum_JSON_values); - - public override Task Can_read_write_collection_of_nullable_uint_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_uint_JSON_values); - - public override Task Can_read_write_collection_of_nullable_uint_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_uint_enum_JSON_values); - - public override Task Can_read_write_collection_of_nullable_TimeSpan_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_TimeSpan_JSON_values); - - public override Task Can_read_write_collection_of_nullable_TimeOnly_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_TimeOnly_JSON_values); - - public override Task Can_read_write_collection_of_nullable_short_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_short_JSON_values); - - public override Task Can_read_write_collection_of_nullable_short_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_short_enum_JSON_values); - - public override Task Can_read_write_collection_of_nullable_sbyte_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_sbyte_JSON_values); - - public override Task Can_read_write_collection_of_nullable_sbyte_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_sbyte_enum_JSON_values); - - public override Task Can_read_write_collection_of_nullable_physical_address_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_physical_address_JSON_values); - - public override Task Can_read_write_collection_of_nullable_long_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_long_JSON_values); - - public override Task Can_read_write_collection_of_nullable_long_enum_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_long_enum_JSON_values); - - public override Task Can_read_write_collection_of_nullable_IP_address_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_IP_address_JSON_values); - - public override Task Can_read_write_collection_of_nullable_int_with_converter_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_nullable_int_with_converter_JSON_values); - - public override Task Can_read_write_collection_of_IP_address_JSON_values() - => Assert.ThrowsAsync(base.Can_read_write_collection_of_IP_address_JSON_values); + public override Task Can_read_write_collection_of_Guid_converted_to_bytes_JSON_values(string expected) + => base.Can_read_write_collection_of_Guid_converted_to_bytes_JSON_values("""{"Prop":["AAAAAAAAAAAAAAAAAAAAAA==","LyREjD\u002BOIEqL6JjHwarevQ==","/////////////////////w=="]}"""); public override Task Can_read_write_point() // No built-in JSON support for spatial types in the Cosmos provider diff --git a/test/EFCore.Cosmos.FunctionalTests/ModelBuilding/CosmosModelBuilderGenericTest.cs b/test/EFCore.Cosmos.FunctionalTests/ModelBuilding/CosmosModelBuilderGenericTest.cs index 763db363163..8c0fb56dbf7 100644 --- a/test/EFCore.Cosmos.FunctionalTests/ModelBuilding/CosmosModelBuilderGenericTest.cs +++ b/test/EFCore.Cosmos.FunctionalTests/ModelBuilding/CosmosModelBuilderGenericTest.cs @@ -11,198 +11,6 @@ public class CosmosModelBuilderGenericTest : ModelBuilderTest { public class CosmosGenericNonRelationship(CosmosModelBuilderFixture fixture) : NonRelationshipTestBase(fixture), IClassFixture { - public override void Can_set_composite_key_for_primitive_collection_on_an_entity_with_fields() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(EntityWithFields), "CollectionCompanyId"), - Assert.Throws( - base.Can_set_composite_key_for_primitive_collection_on_an_entity_with_fields).Message); - - public override void Can_set_alternate_key_for_primitive_collection_on_an_entity_with_fields() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(EntityWithFields), "CollectionCompanyId"), - Assert.Throws( - base.Can_set_alternate_key_for_primitive_collection_on_an_entity_with_fields).Message); - - public override void Can_call_PrimitiveCollection_on_an_entity_with_fields() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(EntityWithFields), "CollectionId"), - Assert.Throws( - base.Can_call_PrimitiveCollection_on_an_entity_with_fields).Message); - - public override void Access_mode_can_be_overridden_at_entity_and_primitive_collection_levels() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Down"), - Assert.Throws( - base.Access_mode_can_be_overridden_at_entity_and_primitive_collection_levels).Message); - - public override void Can_set_custom_value_generator_for_primitive_collections() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Bottom"), - Assert.Throws( - base.Can_set_custom_value_generator_for_primitive_collections).Message); - - public override void Can_set_element_type_annotation() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(Customer), "Notes"), - Assert.Throws( - base.Can_set_element_type_annotation).Message); - - public override void Can_set_max_length_for_primitive_collections() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Bottom"), - Assert.Throws( - base.Can_set_max_length_for_primitive_collections).Message); - - public override void Can_set_primitive_collection_annotation() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(Customer), "Notes"), - Assert.Throws( - base.Can_set_primitive_collection_annotation).Message); - - public override void Can_set_primitive_collection_annotation_by_type() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(Customer), "Notes"), - Assert.Throws( - base.Can_set_primitive_collection_annotation_by_type).Message); - - public override void Can_set_primitive_collection_annotation_when_no_clr_property() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(Customer), "Notes"), - Assert.Throws( - base.Can_set_primitive_collection_annotation_when_no_clr_property).Message); - - public override void Can_set_sentinel_for_primitive_collections() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Bottom"), - Assert.Throws( - base.Can_set_sentinel_for_primitive_collections).Message); - - public override void Can_set_unicode_for_primitive_collections() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Bottom"), - Assert.Throws( - base.Can_set_unicode_for_primitive_collections).Message); - - public override void Element_types_are_nullable_by_default_if_the_type_is_nullable() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Element_types_are_nullable_by_default_if_the_type_is_nullable).Message); - - public override void Element_types_can_be_made_required() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Element_types_can_be_made_required).Message); - - public override void Element_types_can_have_custom_type_value_converter_type_set() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Element_types_can_have_custom_type_value_converter_type_set).Message); - - public override void Element_types_can_have_max_length() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Element_types_can_have_max_length).Message); - - public override void Element_types_can_have_non_generic_value_converter_set() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Element_types_can_have_non_generic_value_converter_set).Message); - - public override void Element_types_can_have_precision_and_scale() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Element_types_can_have_precision_and_scale).Message); - - public override void Element_types_can_have_provider_type_set() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Element_types_can_have_provider_type_set).Message); - - public override void Element_types_can_have_unicode_set() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Element_types_can_have_unicode_set).Message); - - public override void Element_types_have_default_precision_and_scale() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Element_types_have_default_precision_and_scale).Message); - - public override void Element_types_have_default_unicode() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Element_types_have_default_unicode).Message); - - public override void Element_types_have_no_max_length_by_default() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Element_types_have_no_max_length_by_default).Message); - - public override void Primitive_collections_are_required_by_default_only_if_CLR_type_is_nullable() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Primitive_collections_are_required_by_default_only_if_CLR_type_is_nullable).Message); - - public override void Primitive_collections_can_be_made_optional() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Primitive_collections_can_be_made_optional).Message); - - public override void Primitive_collections_can_be_made_required() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Primitive_collections_can_be_made_required).Message); - - public override void Primitive_collections_can_be_set_to_generate_values_on_Add() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Bottom"), - Assert.Throws( - base.Primitive_collections_can_be_set_to_generate_values_on_Add).Message); - - public override void Primitive_collections_can_have_access_mode_set() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Primitive_collections_can_have_access_mode_set).Message); - - public override void Primitive_collections_can_have_field_set() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Down"), - Assert.Throws( - base.Primitive_collections_can_have_field_set).Message); - - public override void Primitive_collections_can_have_value_converter_set() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Primitive_collections_can_have_value_converter_set).Message); - - public override void Primitive_collections_specified_by_string_are_shadow_properties_unless_already_known_to_be_CLR_properties() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Primitive_collections_specified_by_string_are_shadow_properties_unless_already_known_to_be_CLR_properties).Message); - - public override void Value_converter_type_on_primitive_collection_is_checked() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Up"), - Assert.Throws( - base.Value_converter_type_on_primitive_collection_is_checked).Message); - public override void Properties_can_set_row_version() => Assert.Equal( CosmosStrings.NonETagConcurrencyToken(nameof(Quarks), "Charm"), @@ -215,28 +23,20 @@ public override void Properties_can_be_made_concurrency_tokens() Assert.Throws( base.Properties_can_be_made_concurrency_tokens).Message); - public override void Properties_can_have_provider_type_set_for_type() - { - var modelBuilder = CreateModelBuilder(c => c.Properties().HaveConversion()); + public override void Primitive_collections_can_be_made_concurrency_tokens() + => Assert.Equal( + CosmosStrings.NonETagConcurrencyToken(nameof(CollectionQuarks), "Charm"), + Assert.Throws( + base.Primitive_collections_can_be_made_concurrency_tokens).Message); - modelBuilder.Entity( - b => - { - b.Property(e => e.Up); - b.Property(e => e.Down); - b.Property("Charm"); - b.Property("Strange"); - b.Property("__id").HasConversion(null); - }); + public override void Properties_can_have_custom_type_value_converter_type_set() + => Properties_can_have_custom_type_value_converter_type_set(); - var model = modelBuilder.FinalizeModel(); - var entityType = (IReadOnlyEntityType)model.FindEntityType(typeof(Quarks))!; + public override void Properties_can_have_non_generic_value_converter_set() + => Properties_can_have_non_generic_value_converter_set(); - Assert.Null(entityType.FindProperty("Up")!.GetProviderClrType()); - Assert.Same(typeof(byte[]), entityType.FindProperty("Down")!.GetProviderClrType()); - Assert.Null(entityType.FindProperty("Charm")!.GetProviderClrType()); - Assert.Same(typeof(byte[]), entityType.FindProperty("Strange")!.GetProviderClrType()); - } + public override void Properties_can_have_provider_type_set() + => Properties_can_have_provider_type_set(); public override void Properties_can_be_set_to_generate_values_on_Add() { @@ -435,113 +235,20 @@ public virtual void No_alternate_key_is_created_if_id_is_partition_key() Assert.Empty(entity.GetKeys().Where(k => k != entity.FindPrimaryKey())); } - public override void Primitive_collections_can_be_made_concurrency_tokens() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Primitive_collections_can_be_made_concurrency_tokens).Message); - protected override TestModelBuilder CreateModelBuilder(Action? configure = null) => new GenericTestModelBuilder(Fixture, configure); } public class CosmosGenericComplexType(CosmosModelBuilderFixture fixture) : ComplexTypeTestBase(fixture), IClassFixture { - public override void Access_mode_can_be_overridden_at_entity_and_property_levels() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Down"), - Assert.Throws( - base.Access_mode_can_be_overridden_at_entity_and_property_levels).Message); + public override void Properties_can_have_custom_type_value_converter_type_set() + => Properties_can_have_custom_type_value_converter_type_set(); - public override void Can_add_shadow_primitive_collections_when_they_have_been_ignored() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(Customer), "Shadow"), - Assert.Throws( - base.Can_add_shadow_primitive_collections_when_they_have_been_ignored).Message); + public override void Properties_can_have_non_generic_value_converter_set() + => Properties_can_have_non_generic_value_converter_set(); - public override void Can_call_PrimitiveCollection_on_a_field() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(EntityWithFields), "CollectionId"), - Assert.Throws( - base.Can_call_PrimitiveCollection_on_a_field).Message); - - public override void Can_set_custom_value_generator_for_primitive_collections() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Bottom"), - Assert.Throws( - base.Can_set_custom_value_generator_for_primitive_collections).Message); - - public override void Can_set_max_length_for_primitive_collections() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Bottom"), - Assert.Throws( - base.Can_set_max_length_for_primitive_collections).Message); - - public override void Can_set_primitive_collection_annotation_when_no_clr_property() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(Customer), "Ints"), - Assert.Throws( - base.Can_set_primitive_collection_annotation_when_no_clr_property).Message); - - public override void Can_set_sentinel_for_primitive_collections() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Bottom"), - Assert.Throws( - base.Can_set_sentinel_for_primitive_collections).Message); - - public override void Can_set_unicode_for_primitive_collections() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Bottom"), - Assert.Throws( - base.Can_set_unicode_for_primitive_collections).Message); - - public override void Primitive_collections_are_required_by_default_only_if_CLR_type_is_nullable() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Primitive_collections_are_required_by_default_only_if_CLR_type_is_nullable).Message); - - public override void Primitive_collections_can_be_made_concurrency_tokens() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Primitive_collections_can_be_made_concurrency_tokens).Message); - - public override void Primitive_collections_can_be_made_optional() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Primitive_collections_can_be_made_optional).Message); - - public override void Primitive_collections_can_be_made_required() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Primitive_collections_can_be_made_required).Message); - - public override void Primitive_collections_can_be_set_to_generate_values_on_Add() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Bottom"), - Assert.Throws( - base.Primitive_collections_can_be_set_to_generate_values_on_Add).Message); - - public override void Primitive_collections_can_have_field_set() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Down"), - Assert.Throws( - base.Primitive_collections_can_have_field_set).Message); - - public override void Primitive_collections_specified_by_string_are_shadow_properties_unless_already_known_to_be_CLR_properties() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Charm"), - Assert.Throws( - base.Primitive_collections_specified_by_string_are_shadow_properties_unless_already_known_to_be_CLR_properties).Message); - - public override void Properties_can_have_access_mode_set() - => Assert.Equal( - CosmosStrings.PrimitiveCollectionsNotSupported(nameof(CollectionQuarks), "Down"), - Assert.Throws( - base.Properties_can_have_access_mode_set).Message); + public override void Properties_can_have_provider_type_set() + => Properties_can_have_provider_type_set(); public override void Can_set_complex_property_annotation() { @@ -570,38 +277,7 @@ public override void Can_set_complex_property_annotation() AlternateKey (Guid) Required Id (int) Required Name (string) - Notes (List)", complexProperty.ToDebugString(), ignoreLineEndingDifferences: true); - } - - public override void Properties_can_have_provider_type_set_for_type() - { - var modelBuilder = CreateModelBuilder(c => c.Properties().HaveConversion()); - - modelBuilder - .Ignore() - .Ignore() - .Entity( - b => - { - b.Property("__id").HasConversion(null); - b.ComplexProperty( - e => e.Quarks, - b => - { - b.Property(e => e.Up); - b.Property(e => e.Down); - b.Property("Charm"); - b.Property("Strange"); - }); - }); - - var model = modelBuilder.FinalizeModel(); - var complexType = model.FindEntityType(typeof(ComplexProperties))!.GetComplexProperties().Single().ComplexType; - - Assert.Null(complexType.FindProperty("Up")!.GetProviderClrType()); - Assert.Same(typeof(byte[]), complexType.FindProperty("Down")!.GetProviderClrType()); - Assert.Null(complexType.FindProperty("Charm")!.GetProviderClrType()); - Assert.Same(typeof(byte[]), complexType.FindProperty("Strange")!.GetProviderClrType()); + Notes (List) Element type: string Required", complexProperty.ToDebugString(), ignoreLineEndingDifferences: true); } [ConditionalFact] diff --git a/test/EFCore.Cosmos.Tests/ValueGeneration/IdValueGeneratorTest.cs b/test/EFCore.Cosmos.Tests/ValueGeneration/IdValueGeneratorTest.cs index 502567774a5..5edf68d9006 100644 --- a/test/EFCore.Cosmos.Tests/ValueGeneration/IdValueGeneratorTest.cs +++ b/test/EFCore.Cosmos.Tests/ValueGeneration/IdValueGeneratorTest.cs @@ -29,7 +29,6 @@ public void Generated_ids_do_not_clash() Create(new IntClassEntity { Id = new IntClass(2) }), Create(new IntStructEntity { Id = new IntStruct(1) }), Create(new IntStructEntity { Id = new IntStruct(2) }), - Create(new BytesStructEntity { Id = new BytesStruct(null) }), Create(new BytesStructEntity { Id = new BytesStruct([]) }), Create(new BytesStructEntity { Id = new BytesStruct([1]) }), Create(new BytesStructEntity { Id = new BytesStruct([2, 2]) }), diff --git a/test/EFCore.Relational.Specification.Tests/Query/JsonQueryFixtureBase.cs b/test/EFCore.Relational.Specification.Tests/Query/JsonQueryFixtureBase.cs index 16d35739592..a755d47755d 100644 --- a/test/EFCore.Relational.Specification.Tests/Query/JsonQueryFixtureBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Query/JsonQueryFixtureBase.cs @@ -415,7 +415,7 @@ public static void AssertAllTypes(JsonOwnedAllTypes expected, JsonOwnedAllTypes AssertPrimitiveCollection(expected.TestDateTimeOffsetCollection, actual.TestDateTimeOffsetCollection); AssertPrimitiveCollection(expected.TestDoubleCollection, actual.TestDoubleCollection); AssertPrimitiveCollection(expected.TestGuidCollection, actual.TestGuidCollection); - AssertPrimitiveCollection(expected.TestInt16Collection, actual.TestInt16Collection); + AssertPrimitiveCollection((IList)expected.TestInt16Collection, (IList)actual.TestInt16Collection); AssertPrimitiveCollection(expected.TestInt32Collection, actual.TestInt32Collection); AssertPrimitiveCollection(expected.TestInt64Collection, actual.TestInt64Collection); AssertPrimitiveCollection(expected.TestSignedByteCollection, actual.TestSignedByteCollection); diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityAllTypes.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityAllTypes.cs index ded1301b6fa..157cd0ee3cd 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityAllTypes.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonEntityAllTypes.cs @@ -11,15 +11,16 @@ namespace Microsoft.EntityFrameworkCore.TestModels.JsonQuery; public class JsonEntityAllTypes { - private List _testInt64CollectionX = []; - private IList _testDoubleCollectionX = new List(); - private List _testSingleCollectionX = [1.1f, 1.2f]; - private IList _testBooleanCollectionX = new List { true }; - private ObservableCollection _testCharacterCollectionX = []; private ObservableCollection _testNullableInt32CollectionX = [99]; private Collection _testNullableEnumCollectionX = []; private Collection _testNullableEnumWithIntConverterCollectionX = [JsonEnum.Three]; + public List> TestInt64CollectionCollection { get; set; } = []; + public IReadOnlyList TestDoubleCollectionCollection { get; set; } = new List(); + public List[] TestSingleCollectionCollection { get; set; } = [[1.1f, 1.2f]]; + public bool[][] TestBooleanCollectionCollection { get; set; } = []; + public ObservableCollection> TestCharacterCollectionCollection { get; set; } = []; + public int Id { get; set; } public JsonOwnedAllTypes Reference { get; init; } public List Collection { get; init; } @@ -28,72 +29,33 @@ public class JsonEntityAllTypes public List TestMaxLengthStringCollection { get; init; } public IList TestInt16Collection { get; set; } - public int[] TestInt32Collection { get; set; } = []; + public string[][] TestDefaultStringCollectionCollection { get; init; } + public List> TestMaxLengthStringCollectionCollection { get; init; } + public IReadOnlyList> TestInt16CollectionCollection { get; set; } - public List TestInt64Collection - { - get => _testInt64CollectionX; - set - { - _testInt64CollectionX = value; - NewCollectionSet = true; - } - } + public int[] TestInt32Collection { get; set; } = []; - public IList TestDoubleCollection - { - get => _testDoubleCollectionX; - set - { - _testDoubleCollectionX = value; - NewCollectionSet = true; - } - } + public int[][] TestInt32CollectionCollection { get; set; } = []; public decimal[] TestDecimalCollection { get; set; } public List TestDateTimeCollection { get; set; } public IList TestDateTimeOffsetCollection { get; set; } public TimeSpan[] TestTimeSpanCollection { get; set; } = [new(1, 1, 1)]; - public List TestSingleCollection - { - get => _testSingleCollectionX; - set - { - _testSingleCollectionX = value; - NewCollectionSet = true; - } - } - - public IList TestBooleanCollection - { - get => _testBooleanCollectionX; - set - { - _testBooleanCollectionX = value; - NewCollectionSet = true; - } - } - + public ReadOnlyCollection TestInt64Collection { get; set; } = new ReadOnlyCollection([]); + public IList TestDoubleCollection { get; set; } = new List(); + public IReadOnlyList TestSingleCollection { get; set; } = [1.1f, 1.2f]; + public IList TestBooleanCollection { get; set; } = new List { true }; + public ObservableCollection TestCharacterCollection { get; set; } = []; public byte[] TestByteCollection { get; set; } [Required] - public List TestGuidCollection { get; set; } + public ReadOnlyCollection TestGuidCollection { get; set; } public IList TestUnsignedInt16Collection { get; set; } public uint[] TestUnsignedInt32Collection { get; set; } public ObservableCollection TestUnsignedInt64Collection { get; set; } - public ObservableCollection TestCharacterCollection - { - get => _testCharacterCollectionX; - set - { - _testCharacterCollectionX = value; - NewCollectionSet = true; - } - } - public sbyte[] TestSignedByteCollection { get; set; } public ObservableCollection TestNullableInt32Collection @@ -129,6 +91,9 @@ public Collection TestNullableEnumWithIntConverterCollection } } + public ObservableCollection TestNullableInt32CollectionCollection { get; set; } = [[99]]; + public ICollection>> TestNullableEnumCollectionCollection { get; set; } = []; + public JsonEnum?[][][] TestNullableEnumWithIntConverterCollectionCollection { get; set; } = [[[JsonEnum.Three]]]; public JsonEnum?[] TestNullableEnumWithConverterThatHandlesNullsCollection { get; set; } [NotMapped] diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedAllTypes.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedAllTypes.cs index 957445030fc..85558f64b35 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedAllTypes.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonOwnedAllTypes.cs @@ -47,9 +47,15 @@ public class JsonOwnedAllTypes public JsonEnum? TestNullableEnumWithIntConverter { get; set; } public JsonEnum? TestNullableEnumWithConverterThatHandlesNulls { get; set; } + public List> TestInt64CollectionCollection { get; set; } = []; + public List TestDoubleCollectionCollection { get; set; } = new(); + public List TestSingleCollectionCollection { get; set; } = new([([1.1f, 1.2f])]); + public bool[][] TestBooleanCollectionCollection { get; set; } = []; + public ObservableCollection> TestCharacterCollectionCollection { get; set; } = []; + public string[] TestDefaultStringCollection { get; set; } - public List TestMaxLengthStringCollection { get; set; } - public IList TestInt16Collection { get; set; } + public ReadOnlyCollection TestMaxLengthStringCollection { get; set; } + public IReadOnlyList TestInt16Collection { get; set; } public int[] TestInt32Collection { get; set; } = []; @@ -80,6 +86,16 @@ public IList TestDoubleCollection public DateOnly[] TestDateOnlyCollection { get; set; } public TimeOnly[] TestTimeOnlyCollection { get; set; } + public string[][] TestDefaultStringCollectionCollection { get; init; } + public List> TestMaxLengthStringCollectionCollection { get; init; } + public IList> TestInt16CollectionCollection { get; set; } + + public int[][] TestInt32CollectionCollection { get; set; } = []; + + public ObservableCollection TestNullableInt32CollectionCollection { get; set; } = [[99]]; + public ICollection>> TestNullableEnumCollectionCollection { get; set; } = []; + public JsonEnum?[][][] TestNullableEnumWithIntConverterCollectionCollection { get; set; } = [[[JsonEnum.Three]]]; + public List TestSingleCollection { get => _testSingleCollectionX; diff --git a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonQueryData.cs b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonQueryData.cs index 08b314d1779..c8b39a32495 100644 --- a/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonQueryData.cs +++ b/test/EFCore.Relational.Specification.Tests/TestModels/JsonQuery/JsonQueryData.cs @@ -719,12 +719,12 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() TestNullableEnumWithIntConverter = JsonEnum.Two, TestNullableEnumWithConverterThatHandlesNulls = JsonEnum.Three, TestDefaultStringCollection = ["S1", "\"S2\"", "S3"], - TestMaxLengthStringCollection = + TestMaxLengthStringCollection = new ReadOnlyCollection( [ "S1", "S2", "S3" - ], + ]), TestBooleanCollection = new[] { true, false }, TestCharacterCollection = [ @@ -793,7 +793,19 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() JsonEnum.Three, (JsonEnum)(-7) ], - TestNullableEnumWithConverterThatHandlesNullsCollection = [JsonEnum.One, null, (JsonEnum)(-7)] + TestNullableEnumWithConverterThatHandlesNullsCollection = [JsonEnum.One, null, (JsonEnum)(-7)], + TestDefaultStringCollectionCollection = [["S11", "S12", "S13"], null, ["S21", null, "S23"]], + TestMaxLengthStringCollectionCollection = [new ReadOnlyCollection(["S11", "S12", "S13"]), null, new ReadOnlyCollection(["S21", null, "S23"])], + TestBooleanCollectionCollection = [[true], null, [true, false]], + TestCharacterCollectionCollection = [['A', 'B', 'C'], null, ['D', 'E', 'F']], + TestDoubleCollectionCollection = [[-1.23456789, -1.23456789], null, [1.23456789]], + TestInt16CollectionCollection = [[short.MinValue, 0, short.MaxValue], null, [short.MinValue, 0, short.MaxValue]], + TestInt32CollectionCollection = [[int.MinValue, 0, int.MaxValue], null, [int.MinValue, 0, int.MaxValue]], + TestInt64CollectionCollection = [[long.MinValue, 0, long.MaxValue], null, [long.MinValue, 0, long.MaxValue]], + TestSingleCollectionCollection = [[-1.234F, 0.0F, -1.234F], null, [-1.234F, 0.0F, -1.234F]], + TestNullableInt32CollectionCollection = [null, [int.MinValue, null, int.MaxValue, null], null, [int.MinValue, 0, int.MaxValue]], + TestNullableEnumCollectionCollection = [[null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], + TestNullableEnumWithIntConverterCollectionCollection = [[null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], }; var r2 = new JsonOwnedAllTypes @@ -826,12 +838,12 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() TestNullableEnumWithIntConverter = null, TestNullableEnumWithConverterThatHandlesNulls = null, TestDefaultStringCollection = ["S1", "\"S2\"", "S3"], - TestMaxLengthStringCollection = + TestMaxLengthStringCollection = new ReadOnlyCollection( [ "S1", "S2", "S3" - ], + ]), TestBooleanCollection = new[] { true, false }, TestCharacterCollection = [ @@ -895,7 +907,19 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() JsonEnum.Three, (JsonEnum)(-7) ], - TestNullableEnumWithConverterThatHandlesNullsCollection = [JsonEnum.One, null, (JsonEnum)(-7)] + TestNullableEnumWithConverterThatHandlesNullsCollection = [JsonEnum.One, null, (JsonEnum)(-7)], + TestDefaultStringCollectionCollection = [["S11", "S12", "S13"], null, ["S21", null, "S23"]], + TestMaxLengthStringCollectionCollection = [new ReadOnlyCollection(["S11", "S12", "S13"]), null, new ReadOnlyCollection(["S21", null, "S23"])], + TestBooleanCollectionCollection = [[true], null, [true, false]], + TestCharacterCollectionCollection = [['A', 'B', 'C'], null, ['D', 'E', 'F']], + TestDoubleCollectionCollection = [[-1.23456789, -1.23456789], null, [1.23456789]], + TestInt16CollectionCollection = [[short.MinValue, 0, short.MaxValue], null, [short.MinValue, 0, short.MaxValue]], + TestInt32CollectionCollection = [[int.MinValue, 0, int.MaxValue], null, [int.MinValue, 0, int.MaxValue]], + TestInt64CollectionCollection = [[long.MinValue, 0, long.MaxValue], null, [long.MinValue, 0, long.MaxValue]], + TestSingleCollectionCollection = [[-1.234F, 0.0F, -1.234F], null, [-1.234F, 0.0F, -1.234F]], + TestNullableInt32CollectionCollection = [null, [int.MinValue, null, int.MaxValue, null], null, [int.MinValue, 0, int.MaxValue]], + TestNullableEnumCollectionCollection = [[null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], + TestNullableEnumWithIntConverterCollectionCollection = [[null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], }; var c1 = new JsonOwnedAllTypes @@ -928,12 +952,12 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() TestNullableEnumWithIntConverter = JsonEnum.Three, TestNullableEnumWithConverterThatHandlesNulls = JsonEnum.Two, TestDefaultStringCollection = ["S1", "\"S2\"", "S3"], - TestMaxLengthStringCollection = + TestMaxLengthStringCollection = new ReadOnlyCollection( [ "S1", "S2", "S3" - ], + ]), TestBooleanCollection = new[] { true, false }, TestCharacterCollection = [ @@ -997,7 +1021,19 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() JsonEnum.Three, (JsonEnum)(-7) }, - TestNullableEnumWithConverterThatHandlesNullsCollection = [JsonEnum.One, null, (JsonEnum)(-7)] + TestNullableEnumWithConverterThatHandlesNullsCollection = [JsonEnum.One, null, (JsonEnum)(-7)], + TestDefaultStringCollectionCollection = [["S11", "S12", "S13"], null, ["S21", null, "S23"]], + TestMaxLengthStringCollectionCollection = [new ReadOnlyCollection(["S11", "S12", "S13"]), null, new ReadOnlyCollection(["S21", null, "S23"])], + TestBooleanCollectionCollection = [[true], null, [true, false]], + TestCharacterCollectionCollection = [['A', 'B', 'C'], null, ['D', 'E', 'F']], + TestDoubleCollectionCollection = [[-1.23456789, -1.23456789], null, [1.23456789]], + TestInt16CollectionCollection = [[short.MinValue, 0, short.MaxValue], null, [short.MinValue, 0, short.MaxValue]], + TestInt32CollectionCollection = [[int.MinValue, 0, int.MaxValue], null, [int.MinValue, 0, int.MaxValue]], + TestInt64CollectionCollection = [[long.MinValue, 0, long.MaxValue], null, [long.MinValue, 0, long.MaxValue]], + TestSingleCollectionCollection = [[-1.234F, 0.0F, -1.234F], null, [-1.234F, 0.0F, -1.234F]], + TestNullableInt32CollectionCollection = [null, [int.MinValue, null, int.MaxValue, null], null, [int.MinValue, 0, int.MaxValue]], + TestNullableEnumCollectionCollection = [[null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], + TestNullableEnumWithIntConverterCollectionCollection = [[null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], }; var c2 = new JsonOwnedAllTypes @@ -1030,12 +1066,12 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() TestNullableEnumWithIntConverter = null, TestNullableEnumWithConverterThatHandlesNulls = null, TestDefaultStringCollection = ["S1", "\"S2\"", "S3"], - TestMaxLengthStringCollection = + TestMaxLengthStringCollection = new ReadOnlyCollection( [ "S1", "S2", "S3" - ], + ]), TestBooleanCollection = new[] { true, false }, TestCharacterCollection = [ @@ -1099,7 +1135,19 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() JsonEnum.Three, (JsonEnum)(-7) }, - TestNullableEnumWithConverterThatHandlesNullsCollection = [JsonEnum.One, null, (JsonEnum)(-7)] + TestNullableEnumWithConverterThatHandlesNullsCollection = [JsonEnum.One, null, (JsonEnum)(-7)], + TestDefaultStringCollectionCollection = [["S11", "S12", "S13"], null, ["S21", null, "S23"]], + TestMaxLengthStringCollectionCollection = [new ReadOnlyCollection(["S11", "S12", "S13"]), null, new ReadOnlyCollection(["S21", null, "S23"])], + TestBooleanCollectionCollection = [[true], null, [true, false]], + TestCharacterCollectionCollection = [['A', 'B', 'C'], null, ['D', 'E', 'F']], + TestDoubleCollectionCollection = [[-1.23456789, -1.23456789], null, [1.23456789]], + TestInt16CollectionCollection = [[short.MinValue, 0, short.MaxValue], null, [short.MinValue, 0, short.MaxValue]], + TestInt32CollectionCollection = [[int.MinValue, 0, int.MaxValue], null, [int.MinValue, 0, int.MaxValue]], + TestInt64CollectionCollection = [[long.MinValue, 0, long.MaxValue], null, [long.MinValue, 0, long.MaxValue]], + TestSingleCollectionCollection = [[-1.234F, 0.0F, -1.234F], null, [-1.234F, 0.0F, -1.234F]], + TestNullableInt32CollectionCollection = [null, [int.MinValue, null, int.MaxValue, null], null, [int.MinValue, 0, int.MaxValue]], + TestNullableEnumCollectionCollection = [[null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], + TestNullableEnumWithIntConverterCollectionCollection = [[null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], }; return new List @@ -1129,15 +1177,15 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() new[] { new DateTimeOffset(DateTime.Parse("01/01/2000 12:34:56"), TimeSpan.FromHours(-8.0)) }, TestDoubleCollection = new[] { -1.23456789, 1.23456789, 0.0 }, TestDecimalCollection = [-1234567890.01M], - TestGuidCollection = [new("12345678-1234-4321-7777-987654321000")], + TestGuidCollection = new ReadOnlyCollection([new("12345678-1234-4321-7777-987654321000")]), TestInt16Collection = new[] { short.MinValue, (short)0, short.MaxValue }, TestInt32Collection = [int.MinValue, 0, int.MaxValue], - TestInt64Collection = + TestInt64Collection = new ReadOnlyCollection( [ long.MinValue, 0, long.MaxValue - ], + ]), TestSignedByteCollection = [sbyte.MinValue, (sbyte)0, sbyte.MaxValue], TestSingleCollection = [ @@ -1184,7 +1232,19 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() JsonEnum.Three, (JsonEnum)(-7) ], - TestNullableEnumWithConverterThatHandlesNullsCollection = [JsonEnum.One, null, (JsonEnum)(-7)] + TestNullableEnumWithConverterThatHandlesNullsCollection = [JsonEnum.One, null, (JsonEnum)(-7)], + TestDefaultStringCollectionCollection = [["S11", "S12", "S13"], null, ["S21", null, "S23"]], + TestMaxLengthStringCollectionCollection = [["S11", "S12", "S13"], null, ["S21", null, "S23"]], + TestBooleanCollectionCollection = [[true], null, [true, false]], + TestCharacterCollectionCollection = [new ReadOnlyCollection(['A', 'B', 'C']), null, new ReadOnlyCollection(['D', 'E', 'F'])], + TestDoubleCollectionCollection = [[-1.23456789, -1.23456789], null, [1.23456789]], + TestInt16CollectionCollection = [[short.MinValue, 0, short.MaxValue], null, [short.MinValue, 0, short.MaxValue]], + TestInt32CollectionCollection = [[int.MinValue, 0, int.MaxValue], null, [int.MinValue, 0, int.MaxValue]], + TestInt64CollectionCollection = [[long.MinValue, 0, long.MaxValue], null, [long.MinValue, 0, long.MaxValue]], + TestSingleCollectionCollection = [[-1.234F, 0.0F, -1.234F], null, [-1.234F, 0.0F, -1.234F]], + TestNullableInt32CollectionCollection = [null, [int.MinValue, null, int.MaxValue, null], null, [int.MinValue, 0, int.MaxValue]], + TestNullableEnumCollectionCollection = [[null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], + TestNullableEnumWithIntConverterCollectionCollection = [[null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], }, new() { @@ -1211,15 +1271,15 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() new[] { new DateTimeOffset(DateTime.Parse("01/01/2000 12:34:56"), TimeSpan.FromHours(-8.0)) }, TestDoubleCollection = new[] { -1.23456789, 1.23456789, 0.0 }, TestDecimalCollection = [-1234567890.01M], - TestGuidCollection = [new("12345678-1234-4321-7777-987654321000")], + TestGuidCollection = new ReadOnlyCollection([new("12345678-1234-4321-7777-987654321000")]), TestInt16Collection = new[] { short.MinValue, (short)0, short.MaxValue }, TestInt32Collection = [int.MinValue, 0, int.MaxValue], - TestInt64Collection = + TestInt64Collection = new ReadOnlyCollection( [ long.MinValue, 0, long.MaxValue - ], + ]), TestSignedByteCollection = [sbyte.MinValue, (sbyte)0, sbyte.MaxValue], TestSingleCollection = [ @@ -1266,7 +1326,19 @@ public static IReadOnlyList CreateJsonEntitiesAllTypes() JsonEnum.Three, (JsonEnum)(-7) ], - TestNullableEnumWithConverterThatHandlesNullsCollection = [JsonEnum.One, null, (JsonEnum)(-7)] + TestNullableEnumWithConverterThatHandlesNullsCollection = [JsonEnum.One, null, (JsonEnum)(-7)], + TestDefaultStringCollectionCollection = [["S11B", "S12B", "S13B"], null, ["S21B", null, "S23B"]], + TestMaxLengthStringCollectionCollection = [["S11B", "S12B", "S13B"], null, ["S21B", null, "S23B"]], + TestBooleanCollectionCollection = [[true], null, [true, false]], + TestCharacterCollectionCollection = [new ReadOnlyCollection(['A', 'B', 'C']), null, new ReadOnlyCollection(['D', 'E', 'F'])], + TestDoubleCollectionCollection = [[-1.23456789, -1.23456789], null, [1.23456789]], + TestInt16CollectionCollection = [[short.MinValue, 0, short.MaxValue], null, [short.MinValue, 0, short.MaxValue]], + TestInt32CollectionCollection = [[int.MinValue, 0, int.MaxValue], null, [int.MinValue, 0, int.MaxValue]], + TestInt64CollectionCollection = [[long.MinValue, 0, long.MaxValue], null, [long.MinValue, 0, long.MaxValue]], + TestSingleCollectionCollection = [[-1.234F, 0.0F, -1.234F], null, [-1.234F, 0.0F, -1.234F]], + TestNullableInt32CollectionCollection = [null, [int.MinValue, null, int.MaxValue, null], null, [int.MinValue, 0, int.MaxValue]], + TestNullableEnumCollectionCollection = [[null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], + TestNullableEnumWithIntConverterCollectionCollection = [[null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], } }; } diff --git a/test/EFCore.Relational.Specification.Tests/Update/JsonUpdateTestBase.cs b/test/EFCore.Relational.Specification.Tests/Update/JsonUpdateTestBase.cs index 2edc291e259..035e7fa0fdd 100644 --- a/test/EFCore.Relational.Specification.Tests/Update/JsonUpdateTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Update/JsonUpdateTestBase.cs @@ -2627,7 +2627,7 @@ public virtual Task Edit_single_property_relational_collection_of_guid() { var query = await context.JsonEntitiesAllTypes.ToListAsync(); var entity = query.Single(x => x.Id == 1); - entity.TestGuidCollection = [new("12345678-1234-4321-5555-987654321000")]; + entity.TestGuidCollection = new ReadOnlyCollection([new("12345678-1234-4321-5555-987654321000")]); ClearLog(); await context.SaveChangesAsync(); @@ -2635,7 +2635,7 @@ public virtual Task Edit_single_property_relational_collection_of_guid() async context => { var result = await context.Set().SingleAsync(x => x.Id == 1); - Assert.Equal([new("12345678-1234-4321-5555-987654321000")], result.TestGuidCollection); + Assert.Equal(new ReadOnlyCollection([new("12345678-1234-4321-5555-987654321000")]), result.TestGuidCollection); Assert.False(result.NewCollectionSet); }); @@ -2693,7 +2693,7 @@ public virtual Task Edit_single_property_relational_collection_of_int64() { var query = await context.JsonEntitiesAllTypes.ToListAsync(); var entity = query.Single(x => x.Id == 1); - entity.TestInt64Collection.Clear(); + entity.TestInt64Collection = new([]); ClearLog(); await context.SaveChangesAsync(); @@ -2737,7 +2737,7 @@ public virtual Task Edit_single_property_relational_collection_of_single() { var query = await context.JsonEntitiesAllTypes.ToListAsync(); var entity = query.Single(x => x.Id == 1); - entity.TestSingleCollection.RemoveAt(0); + entity.TestSingleCollection = new[] { 0.0F, -1.234F }; ClearLog(); await context.SaveChangesAsync(); @@ -3065,18 +3065,259 @@ public virtual Task Edit_single_property_relational_collection_of_nullable_enum_ }); [ConditionalFact] - public virtual async Task SaveChanges_throws_when_required_primitive_collection_is_null() - => await TestHelpers.ExecuteWithStrategyInTransactionAsync( + public virtual Task Edit_single_property_collection_of_collection_of_bool() + { + var expected1 = new[] { new[] { true, true, false }, null, Array.Empty(), new[] { true, true, false } }; + var expected2 = new[] { new[] { true, true, true, false }, null, Array.Empty(), new[] { true, true, true, false } }; + + return TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(x => x.Id == 1); + entity.Reference.TestBooleanCollectionCollection = expected1; + entity.Collection[0].TestBooleanCollectionCollection = expected2; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(x => x.Id == 1); + Assert.Equal(expected1, result.Reference.TestBooleanCollectionCollection); + Assert.Equal(expected2, result.Collection[0].TestBooleanCollectionCollection); + }); + } + + [ConditionalFact] + public virtual Task Edit_single_property_collection_of_collection_of_char() + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(x => x.Id == 1); + entity.Reference.TestCharacterCollectionCollection[0] = + ['E', 'F', 'C', 'ö', 'r', 'E', '\"', '\\']; + entity.Collection[0].TestCharacterCollectionCollection[2] = ['D', 'E', 'F', '\0']; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(x => x.Id == 1); + Assert.Equal([['E', 'F', 'C', 'ö', 'r', 'E', '\"', '\\'], null, ['D', 'E', 'F']], result.Reference.TestCharacterCollectionCollection); + Assert.Equal([['A', 'B', 'C'], null, ['D', 'E', 'F', '\0']], result.Collection[0].TestCharacterCollectionCollection); + }); + + [ConditionalFact] + public virtual Task Edit_single_property_collection_of_collection_of_double() + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(x => x.Id == 1); + entity.Reference.TestDoubleCollectionCollection[0][1] = -3.23579; + entity.Reference.TestDoubleCollectionCollection[2] = null; + entity.Collection[0].TestDoubleCollectionCollection[1] = [-3.23579]; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(x => x.Id == 1); + Assert.Equal([[-1.23456789, -3.23579], null, null], result.Reference.TestDoubleCollectionCollection); + Assert.Equal([[-1.23456789, -1.23456789], [-3.23579], [1.23456789]], result.Collection[0].TestDoubleCollectionCollection); + }); + + [ConditionalFact] + public virtual Task Edit_single_property_collection_of_collection_of_int16() + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(x => x.Id == 1); + entity.Reference.TestInt16CollectionCollection[2] = [short.MinValue, 0, short.MaxValue, 3234]; + entity.Collection[0].TestInt16CollectionCollection.Add(null); + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(x => x.Id == 1); + Assert.Equal([[short.MinValue, 0, short.MaxValue], null, [short.MinValue, 0, short.MaxValue, 3234]], result.Reference.TestInt16CollectionCollection); + Assert.Equal([[short.MinValue, 0, short.MaxValue], null, [short.MinValue, 0, short.MaxValue], null], result.Collection[0].TestInt16CollectionCollection); + }); + + [ConditionalFact] + public virtual Task Edit_single_property_collection_of_collection_of_int32() + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(x => x.Id == 1); + entity.Reference.TestInt32CollectionCollection[0] = [-3234]; + entity.Collection[0].TestInt32CollectionCollection[2] = [-3234]; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(x => x.Id == 1); + Assert.Equal([[-3234], null, [int.MinValue, 0, int.MaxValue]], result.Reference.TestInt32CollectionCollection); + Assert.Equal([[int.MinValue, 0, int.MaxValue], null, [-3234]], result.Collection[0].TestInt32CollectionCollection); + }); + + [ConditionalFact] + public virtual Task Edit_single_property_collection_of_collection_of_int64() + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(x => x.Id == 1); + entity.Reference.TestInt64CollectionCollection.Clear(); + entity.Collection[0].TestInt64CollectionCollection.Clear(); + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(x => x.Id == 1); + Assert.Empty(result.Reference.TestInt64CollectionCollection); + Assert.Empty(result.Collection[0].TestInt64CollectionCollection); + }); + + [ConditionalFact] + public virtual Task Edit_single_property_collection_of_collection_of_single() + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(x => x.Id == 1); + entity.Reference.TestSingleCollectionCollection.RemoveAt(0); + entity.Collection[0].TestSingleCollectionCollection.RemoveAt(1); + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(x => x.Id == 1); + Assert.Equal([null, [-1.234F, 0.0F, -1.234F]], result.Reference.TestSingleCollectionCollection); + Assert.Equal([[-1.234F, 0.0F, -1.234F], [-1.234F, 0.0F, -1.234F]], result.Collection[0].TestSingleCollectionCollection); + + Assert.False(result.Reference.NewCollectionSet); + Assert.False(result.Collection[0].NewCollectionSet); + }); + + [ConditionalFact] + public virtual Task Edit_single_property_collection_of_collection_of_nullable_int32() + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(x => x.Id == 1); + entity.Reference.TestNullableInt32CollectionCollection[0] = [77]; + entity.Reference.TestNullableInt32CollectionCollection.Add(null); + entity.Collection[0].TestNullableInt32CollectionCollection.Add([null, 77]); + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(x => x.Id == 1); + Assert.Equal([[77], [int.MinValue, null, int.MaxValue, null], null, [int.MinValue, 0, int.MaxValue], null], result.Reference.TestNullableInt32CollectionCollection); + Assert.Equal([null, [int.MinValue, null, int.MaxValue, null], null, [int.MinValue, 0, int.MaxValue], [null, 77]], result.Collection[0].TestNullableInt32CollectionCollection); + }); + + [ConditionalFact] + public virtual Task Edit_single_property_collection_of_collection_of_nullable_int32_set_to_null() + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(x => x.Id == 1); + entity.Reference.TestNullableInt32CollectionCollection = null; + entity.Collection[0].TestNullableInt32CollectionCollection = null; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(x => x.Id == 1); + Assert.Null(result.Reference.TestNullableInt32CollectionCollection); + Assert.Null(result.Collection[0].TestNullableInt32CollectionCollection); + }); + + [ConditionalFact] + public virtual Task Edit_single_property_collection_of_collection_of_nullable_enum_set_to_null() + => TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(x => x.Id == 1); + entity.Reference.TestNullableEnumCollectionCollection = null; + entity.Collection[0].TestNullableEnumCollectionCollection = null; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(x => x.Id == 1); + Assert.Null(result.Reference.TestNullableEnumCollectionCollection); + Assert.Null(result.Collection[0].TestNullableEnumCollectionCollection); + }); + + [ConditionalFact] + public virtual Task Edit_single_property_collection_of_collection_of_nullable_enum_with_int_converter() + => TestHelpers.ExecuteWithStrategyInTransactionAsync( CreateContext, UseTransaction, async context => { - var entity = new JsonEntityAllTypes { TestGuidCollection = null }; - context.Add(entity); + var query = await context.JsonEntitiesAllTypes.ToListAsync(); + var entity = query.Single(x => x.Id == 1); + entity.Reference.TestNullableEnumWithIntConverterCollectionCollection[0][1][1] = JsonEnum.Two; + entity.Reference.TestNullableEnumWithIntConverterCollectionCollection[0][1] = [JsonEnum.Two, null]; + entity.Collection[0].TestNullableEnumWithIntConverterCollectionCollection[0] = [null, [null, null]]; + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + var result = await context.Set().SingleAsync(x => x.Id == 1); Assert.Equal( - CoreStrings.NullRequiredPrimitiveCollection(nameof(JsonEntityAllTypes), nameof(JsonEntityAllTypes.TestGuidCollection)), - (await Assert.ThrowsAsync(async () => await context.SaveChangesAsync())).Message); + [[null, [JsonEnum.Two, null], null, [JsonEnum.One, null, JsonEnum.Three, (JsonEnum)(-7)]], null], + result.Reference.TestNullableEnumWithIntConverterCollectionCollection); + Assert.Equal([[null, [null, null]], null], result.Collection[0].TestNullableEnumWithIntConverterCollectionCollection); }); [ConditionalTheory] @@ -3254,10 +3495,10 @@ public virtual Task Add_and_update_nested_optional_primitive_collection(bool? va TestDateTimeOffsetCollection = [], TestDoubleCollection = [], TestDecimalCollection = [], - TestGuidCollection = [], + TestGuidCollection = new([]), TestInt16Collection = [], TestInt32Collection = [], - TestInt64Collection = [], + TestInt64Collection = new([]), TestSignedByteCollection = [], TestSingleCollection = [], TestTimeSpanCollection = [], @@ -3269,13 +3510,24 @@ public virtual Task Add_and_update_nested_optional_primitive_collection(bool? va TestEnumWithIntConverterCollection = [], TestNullableEnumCollection = [], TestNullableEnumWithIntConverterCollection = [], - TestNullableEnumWithConverterThatHandlesNullsCollection = Array.Empty(), + TestDefaultStringCollectionCollection = [], + TestMaxLengthStringCollectionCollection = [], + TestBooleanCollectionCollection = [], + TestCharacterCollectionCollection = [], + TestDoubleCollectionCollection = [], + TestInt16CollectionCollection = [], + TestInt32CollectionCollection = [], + TestInt64CollectionCollection = [], + TestSingleCollectionCollection = [], + TestNullableInt32CollectionCollection = [], + TestNullableEnumCollectionCollection = [], + TestNullableEnumWithIntConverterCollectionCollection = [], Collection = [ new() { TestDefaultStringCollection = [], - TestMaxLengthStringCollection = [], + TestMaxLengthStringCollection = new([]), TestBooleanCollection = [], TestDateTimeCollection = [], TestDateTimeOffsetCollection = [], diff --git a/test/EFCore.Specification.Tests/JsonTypesTestBase.cs b/test/EFCore.Specification.Tests/JsonTypesTestBase.cs index 3aaa314d8b3..7b29f158c75 100644 --- a/test/EFCore.Specification.Tests/JsonTypesTestBase.cs +++ b/test/EFCore.Specification.Tests/JsonTypesTestBase.cs @@ -258,8 +258,8 @@ protected class CharacterType [InlineData("00000000-0000-0000-0000-000000000000", """{"Prop":"00000000-0000-0000-0000-000000000000"}""")] [InlineData("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF", """{"Prop":"ffffffff-ffff-ffff-ffff-ffffffffffff"}""")] [InlineData("8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD", """{"Prop":"8c44242f-8e3f-4a20-8be8-98c7c1aadebd"}""")] - public virtual Task Can_read_write_GUID_JSON_values(Guid value, string json) - => Can_read_and_write_JSON_value(nameof(GuidType.Guid), value, json); + public virtual Task Can_read_write_GUID_JSON_values(string value, string json) + => Can_read_and_write_JSON_value(nameof(GuidType.Guid), new Guid(value), json); protected class GuidType { @@ -1748,7 +1748,7 @@ protected class Int8CollectionType [ConditionalFact] public virtual Task Can_read_write_collection_of_short_JSON_values() - => Can_read_and_write_JSON_value>( + => Can_read_and_write_JSON_value>( nameof(Int16CollectionType.Int16), [ short.MinValue, @@ -1760,24 +1760,24 @@ public virtual Task Can_read_write_collection_of_short_JSON_values() protected class Int16CollectionType { - public IList Int16 { get; set; } = null!; + public IReadOnlyCollection Int16 { get; set; } = null!; } [ConditionalFact] public virtual Task Can_read_write_collection_of_int_JSON_values() - => Can_read_and_write_JSON_value>( + => Can_read_and_write_JSON_value>( nameof(Int32CollectionType.Int32), - [ + new ReadOnlyCollection([ int.MinValue, 0, int.MaxValue - ], + ]), """{"Prop":[-2147483648,0,2147483647]}""", mappedCollection: true); protected class Int32CollectionType { - public List Int32 { get; set; } = null!; + public ReadOnlyCollection Int32 { get; set; } = null!; } [ConditionalFact] @@ -1900,8 +1900,9 @@ protected class DoubleCollectionType public double[] Double { get; set; } = null!; } - [ConditionalFact] - public virtual Task Can_read_write_collection_of_decimal_JSON_values() + [ConditionalTheory] + [InlineData("""{"Prop":[-79228162514264337593543950335,0,79228162514264337593543950335]}""")] + public virtual Task Can_read_write_collection_of_decimal_JSON_values(string expected) => Can_read_and_write_JSON_value>( nameof(DecimalCollectionType.Decimal), [ @@ -1909,7 +1910,7 @@ public virtual Task Can_read_write_collection_of_decimal_JSON_values() 0, decimal.MaxValue ], - """{"Prop":[-79228162514264337593543950335,0,79228162514264337593543950335]}""", + expected, mappedCollection: true); protected class DecimalCollectionType @@ -1936,7 +1937,7 @@ protected class DateOnlyCollectionType [ConditionalFact] public virtual Task Can_read_write_collection_of_TimeOnly_JSON_values() - => Can_read_and_write_JSON_value>( + => Can_read_and_write_JSON_value>( nameof(TimeOnlyCollectionType.TimeOnly), [ TimeOnly.MinValue, @@ -1949,11 +1950,12 @@ public virtual Task Can_read_write_collection_of_TimeOnly_JSON_values() protected class TimeOnlyCollectionType { - public IList TimeOnly { get; set; } = null!; + public IReadOnlyCollection TimeOnly { get; set; } = null!; } - [ConditionalFact] - public virtual Task Can_read_write_collection_of_DateTime_JSON_values() + [ConditionalTheory] + [InlineData("""{"Prop":["0001-01-01T00:00:00","2023-05-29T10:52:47","9999-12-31T23:59:59.9999999"]}""")] + public virtual Task Can_read_write_collection_of_DateTime_JSON_values(string expected) => Can_read_and_write_JSON_value>( nameof(DateTimeCollectionType.DateTime), [ @@ -1961,7 +1963,7 @@ public virtual Task Can_read_write_collection_of_DateTime_JSON_values() new(2023, 5, 29, 10, 52, 47), DateTime.MaxValue ], - """{"Prop":["0001-01-01T00:00:00","2023-05-29T10:52:47","9999-12-31T23:59:59.9999999"]}""", + expected, mappedCollection: true); protected class DateTimeCollectionType @@ -1969,8 +1971,9 @@ protected class DateTimeCollectionType public IList DateTime { get; set; } = null!; } - [ConditionalFact] - public virtual Task Can_read_write_collection_of_DateTimeOffset_JSON_values() + [ConditionalTheory] + [InlineData("""{"Prop":["0001-01-01T00:00:00+00:00","2023-05-29T10:52:47-02:00","2023-05-29T10:52:47+00:00","2023-05-29T10:52:47+02:00","9999-12-31T23:59:59.9999999+00:00"]}""")] + public virtual Task Can_read_write_collection_of_DateTimeOffset_JSON_values(string expected) => Can_read_and_write_JSON_value>( nameof(DateTimeOffsetCollectionType.DateTimeOffset), [ @@ -1980,7 +1983,7 @@ public virtual Task Can_read_write_collection_of_DateTimeOffset_JSON_values() new(new DateTime(2023, 5, 29, 10, 52, 47), new TimeSpan(2, 0, 0)), DateTimeOffset.MaxValue ], - """{"Prop":["0001-01-01T00:00:00+00:00","2023-05-29T10:52:47-02:00","2023-05-29T10:52:47+00:00","2023-05-29T10:52:47+02:00","9999-12-31T23:59:59.9999999+00:00"]}""", + expected, mappedCollection: true); protected class DateTimeOffsetCollectionType @@ -2035,8 +2038,9 @@ protected class CharacterCollectionType public IList Character { get; set; } = null!; } - [ConditionalFact] - public virtual Task Can_read_write_collection_of_GUID_JSON_values() + [ConditionalTheory] + [InlineData("""{"Prop":["00000000-0000-0000-0000-000000000000","8c44242f-8e3f-4a20-8be8-98c7c1aadebd","ffffffff-ffff-ffff-ffff-ffffffffffff"]}""")] + public virtual Task Can_read_write_collection_of_GUID_JSON_values(string expected) => Can_read_and_write_JSON_value>( nameof(GuidCollectionType.Guid), [ @@ -2044,7 +2048,7 @@ public virtual Task Can_read_write_collection_of_GUID_JSON_values() new("8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"), Guid.Parse("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF") ], - """{"Prop":["00000000-0000-0000-0000-000000000000","8c44242f-8e3f-4a20-8be8-98c7c1aadebd","ffffffff-ffff-ffff-ffff-ffffffffffff"]}""", + expected, mappedCollection: true); protected class GuidCollectionType @@ -2054,7 +2058,7 @@ protected class GuidCollectionType [ConditionalFact] public virtual Task Can_read_write_collection_of_string_JSON_values() - => Can_read_and_write_JSON_value>( + => Can_read_and_write_JSON_value>( nameof(StringCollectionType.String), [ "MinValue", @@ -2066,11 +2070,12 @@ public virtual Task Can_read_write_collection_of_string_JSON_values() protected class StringCollectionType { - public IList String { get; set; } = null!; + public IReadOnlyCollection String { get; set; } = null!; } - [ConditionalFact] - public virtual Task Can_read_write_collection_of_binary_JSON_values() + [ConditionalTheory] + [InlineData("""{"Prop":["AAAAAQ==","/////w==","","AQIDBA=="]}""")] + public virtual Task Can_read_write_collection_of_binary_JSON_values(string expected) => Can_read_and_write_JSON_value>( nameof(BytesCollectionType.Bytes), [ @@ -2079,7 +2084,7 @@ public virtual Task Can_read_write_collection_of_binary_JSON_values() [], [1, 2, 3, 4] ], - """{"Prop":["AAAAAQ==","/////w==","","AQIDBA=="]}""", + expected, mappedCollection: true); protected class BytesCollectionType @@ -2105,9 +2110,9 @@ protected class UriCollectionType [ConditionalFact] public virtual Task Can_read_write_collection_of_IP_address_JSON_values() - => Can_read_and_write_JSON_value>( + => Can_read_and_write_JSON_value>( nameof(IpAddressCollectionType.IpAddress), - [ + new ReadOnlyCollection([ IPAddress.Parse("127.0.0.1"), IPAddress.Parse("0.0.0.0"), IPAddress.Parse("255.255.255.255"), @@ -2115,13 +2120,13 @@ public virtual Task Can_read_write_collection_of_IP_address_JSON_values() IPAddress.Parse("::1"), IPAddress.Parse("::"), IPAddress.Parse("2a00:23c7:c60f:4f01:ba43:6d5a:e648:7577") - ], + ]), """{"Prop":["127.0.0.1","0.0.0.0","255.255.255.255","192.168.1.156","::1","::","2a00:23c7:c60f:4f01:ba43:6d5a:e648:7577"]}""", mappedCollection: true); protected class IpAddressCollectionType { - public List IpAddress { get; set; } = null!; + public ReadOnlyCollection IpAddress { get; set; } = null!; } [ConditionalFact] @@ -2315,7 +2320,7 @@ protected class NullableInt8CollectionType [ConditionalFact] public virtual Task Can_read_write_collection_of_nullable_short_JSON_values() - => Can_read_and_write_JSON_value>( + => Can_read_and_write_JSON_value>( nameof(NullableInt16CollectionType.Int16), [ short.MinValue, @@ -2328,7 +2333,7 @@ public virtual Task Can_read_write_collection_of_nullable_short_JSON_values() protected class NullableInt16CollectionType { - public IList Int16 { get; set; } = null!; + public IReadOnlyCollection Int16 { get; set; } = null!; } [ConditionalFact] @@ -2351,20 +2356,21 @@ protected class NullableInt32CollectionType [ConditionalFact] public virtual Task Can_read_write_collection_of_nullable_long_JSON_values() - => Can_read_and_write_JSON_value>( + => Can_read_and_write_JSON_value>( nameof(NullableInt64CollectionType.Int64), + new ReadOnlyCollection( [ long.MinValue, 0, long.MaxValue, null - ], + ]), """{"Prop":[-9223372036854775808,0,9223372036854775807,null]}""", mappedCollection: true); protected class NullableInt64CollectionType { - public IList Int64 { get; set; } = null!; + public ReadOnlyCollection Int64 { get; set; } = null!; } [ConditionalFact] @@ -2475,8 +2481,9 @@ protected class NullableDoubleCollectionType public double?[] Double { get; set; } = null!; } - [ConditionalFact] - public virtual Task Can_read_write_collection_of_nullable_decimal_JSON_values() + [ConditionalTheory] + [InlineData("""{"Prop":[-79228162514264337593543950335,0,null,79228162514264337593543950335]}""")] + public virtual Task Can_read_write_collection_of_nullable_decimal_JSON_values(string expected) => Can_read_and_write_JSON_value>( nameof(NullableDecimalCollectionType.Decimal), [ @@ -2485,7 +2492,7 @@ public virtual Task Can_read_write_collection_of_nullable_decimal_JSON_values() null, decimal.MaxValue ], - """{"Prop":[-79228162514264337593543950335,0,null,79228162514264337593543950335]}""", + expected, mappedCollection: true); protected class NullableDecimalCollectionType @@ -2526,11 +2533,12 @@ public virtual Task Can_read_write_collection_of_nullable_TimeOnly_JSON_values() protected class NullableTimeOnlyCollectionType { - public IList TimeOnly { get; set; } = null!; + public IReadOnlyList TimeOnly { get; set; } = null!; } - [ConditionalFact] - public virtual Task Can_read_write_collection_of_nullable_DateTime_JSON_values() + [ConditionalTheory] + [InlineData("""{"Prop":["0001-01-01T00:00:00",null,"2023-05-29T10:52:47","9999-12-31T23:59:59.9999999"]}""")] + public virtual Task Can_read_write_collection_of_nullable_DateTime_JSON_values(string expected) => Can_read_and_write_JSON_value>( nameof(NullableDateTimeCollectionType.DateTime), [ @@ -2539,7 +2547,7 @@ public virtual Task Can_read_write_collection_of_nullable_DateTime_JSON_values() new(2023, 5, 29, 10, 52, 47), DateTime.MaxValue ], - """{"Prop":["0001-01-01T00:00:00",null,"2023-05-29T10:52:47","9999-12-31T23:59:59.9999999"]}""", + expected, mappedCollection: true); protected class NullableDateTimeCollectionType @@ -2547,8 +2555,9 @@ protected class NullableDateTimeCollectionType public IList DateTime { get; set; } = null!; } - [ConditionalFact] - public virtual Task Can_read_write_collection_of_nullable_DateTimeOffset_JSON_values() + [ConditionalTheory] + [InlineData("""{"Prop":["0001-01-01T00:00:00+00:00","2023-05-29T10:52:47-02:00","2023-05-29T10:52:47+00:00",null,"2023-05-29T10:52:47+02:00","9999-12-31T23:59:59.9999999+00:00"]}""")] + public virtual Task Can_read_write_collection_of_nullable_DateTimeOffset_JSON_values(string expected) => Can_read_and_write_JSON_value>( nameof(NullableDateTimeOffsetCollectionType.DateTimeOffset), [ @@ -2559,12 +2568,12 @@ public virtual Task Can_read_write_collection_of_nullable_DateTimeOffset_JSON_va new(new DateTime(2023, 5, 29, 10, 52, 47), new TimeSpan(2, 0, 0)), DateTimeOffset.MaxValue ], - """{"Prop":["0001-01-01T00:00:00+00:00","2023-05-29T10:52:47-02:00","2023-05-29T10:52:47+00:00",null,"2023-05-29T10:52:47+02:00","9999-12-31T23:59:59.9999999+00:00"]}""", + expected, mappedCollection: true); protected class NullableDateTimeOffsetCollectionType { - public IList DateTimeOffset { get; set; } = null!; + public IReadOnlyList DateTimeOffset { get; set; } = null!; } [ConditionalFact] @@ -2587,19 +2596,20 @@ protected class NullableTimeSpanCollectionType [ConditionalFact] public virtual Task Can_read_write_collection_of_nullable_bool_JSON_values() - => Can_read_and_write_JSON_value>( + => Can_read_and_write_JSON_value>( nameof(NullableBooleanCollectionType.Boolean), + new ReadOnlyCollection( [ false, null, true - ], + ]), """{"Prop":[false,null,true]}""", mappedCollection: true); protected class NullableBooleanCollectionType { - public IList Boolean { get; set; } = null!; + public ReadOnlyCollection Boolean { get; set; } = null!; } [ConditionalFact] @@ -2620,8 +2630,9 @@ protected class NullableCharacterCollectionType public IList Character { get; set; } = null!; } - [ConditionalFact] - public virtual Task Can_read_write_collection_of_nullable_GUID_JSON_values() + [ConditionalTheory] + [InlineData("""{"Prop":["00000000-0000-0000-0000-000000000000",null,"8c44242f-8e3f-4a20-8be8-98c7c1aadebd","ffffffff-ffff-ffff-ffff-ffffffffffff"]}""")] + public virtual Task Can_read_write_collection_of_nullable_GUID_JSON_values(string expected) => Can_read_and_write_JSON_value>( nameof(NullableGuidCollectionType.Guid), [ @@ -2630,7 +2641,7 @@ public virtual Task Can_read_write_collection_of_nullable_GUID_JSON_values() new("8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"), Guid.Parse("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF") ], - """{"Prop":["00000000-0000-0000-0000-000000000000",null,"8c44242f-8e3f-4a20-8be8-98c7c1aadebd","ffffffff-ffff-ffff-ffff-ffffffffffff"]}""", + expected, mappedCollection: true); protected class NullableGuidCollectionType @@ -2656,8 +2667,9 @@ protected class NullableStringCollectionType public IList String { get; set; } = null!; } - [ConditionalFact] - public virtual Task Can_read_write_collection_of_nullable_binary_JSON_values() + [ConditionalTheory] + [InlineData("""{"Prop":["AAAAAQ==",null,"/////w==","","AQIDBA=="]}""")] + public virtual Task Can_read_write_collection_of_nullable_binary_JSON_values(string expected) => Can_read_and_write_JSON_value>( nameof(NullableBytesCollectionType.Bytes), [ @@ -2667,7 +2679,7 @@ public virtual Task Can_read_write_collection_of_nullable_binary_JSON_values() [], [1, 2, 3, 4] ], - """{"Prop":["AAAAAQ==",null,"/////w==","","AQIDBA=="]}""", + expected, mappedCollection: true); protected class NullableBytesCollectionType @@ -3377,8 +3389,9 @@ protected class BinaryAsJsonType public byte[] BinaryAsJson { get; set; } = null!; } - [ConditionalFact] - public virtual Task Can_read_write_collection_of_decimal_with_precision_and_scale_JSON_values() + [ConditionalTheory] + [InlineData("""{"Prop":[-79228162514264337593543950335,0,79228162514264337593543950335]}""")] + public virtual Task Can_read_write_collection_of_decimal_with_precision_and_scale_JSON_values(string expected) => Can_read_and_write_JSON_collection_value>( b => b.ElementType().HasPrecision(12, 6), nameof(DecimalCollectionType.Decimal), @@ -3387,11 +3400,12 @@ public virtual Task Can_read_write_collection_of_decimal_with_precision_and_scal 0, decimal.MaxValue ], - """{"Prop":[-79228162514264337593543950335,0,79228162514264337593543950335]}""", + expected, facets: new Dictionary { { CoreAnnotationNames.Precision, 12 }, { CoreAnnotationNames.Scale, 6 } }); - [ConditionalFact] - public virtual Task Can_read_write_collection_of_Guid_converted_to_bytes_JSON_values() + [ConditionalTheory] + [InlineData("""{"Prop":["AAAAAAAAAAAAAAAAAAAAAA==","LyREjD+OIEqL6JjHwarevQ==","/////////////////////w=="]}""")] + public virtual Task Can_read_write_collection_of_Guid_converted_to_bytes_JSON_values(string expected) => Can_read_and_write_JSON_collection_value>( b => b.ElementType().HasConversion(), nameof(GuidCollectionType.Guid), @@ -3400,9 +3414,431 @@ public virtual Task Can_read_write_collection_of_Guid_converted_to_bytes_JSON_va new("8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"), Guid.Parse("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF") ], - """{"Prop":["AAAAAAAAAAAAAAAAAAAAAA==","LyREjD+OIEqL6JjHwarevQ==","/////////////////////w=="]}""", + expected, facets: new Dictionary { { CoreAnnotationNames.ProviderClrType, typeof(byte[]) } }); + [ConditionalFact] + public virtual Task Can_read_write_list_of_array_of_int_JSON_values() + => Can_read_and_write_JSON_value>( + nameof(Int32ArrayListType.Prop), + new List + { + new[] { int.MinValue, 0, int.MaxValue }, + Array.Empty(), + null, + new[] { 77 } + }, + """{"Prop":[[-2147483648,0,2147483647],[],null,[77]]}""", + mappedCollection: true); + + protected class Int32ArrayListType + { + public List Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_list_of_array_of_nullable_int_JSON_values() + => Can_read_and_write_JSON_value>( + nameof(NullableInt32ArrayListType.Prop), + new List + { + new int?[] { int.MinValue, null, int.MaxValue }, + Array.Empty(), + null, + new int?[] { 77 } + }, + """{"Prop":[[-2147483648,null,2147483647],[],null,[77]]}""", + mappedCollection: true); + + protected class NullableInt32ArrayListType + { + public List Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_list_of_array_of_string_JSON_values() + => Can_read_and_write_JSON_value>( + nameof(StringArrayListType.Prop), + new List + { + new[] { "X", "Y", "" }, + Array.Empty(), + new[] { "77" } + }, + """{"Prop":[["X","Y",""],[],["77"]]}""", + mappedCollection: true); + + protected class StringArrayListType + { + public List Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_list_of_array_of_IPAddress_JSON_values() + => Can_read_and_write_JSON_value>( + nameof(IpAddressArrayListType.Prop), + new ObservableCollection + { + new[] { IPAddress.Parse("127.0.0.1"), IPAddress.Parse("2a00:23c7:c60f:4f01:ba43:6d5a:e648:7577") }, + Array.Empty(), + new[] { new IPAddress(0) } + }, + """{"Prop":[["127.0.0.1","2a00:23c7:c60f:4f01:ba43:6d5a:e648:7577"],[],["0.0.0.0"]]}""", + mappedCollection: true); + + protected class IpAddressArrayListType + { + public ObservableCollection Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_list_of_array_of_ulong_JSON_values() + => Can_read_and_write_JSON_value>( + nameof(ULongArrayListType.Prop), + new List + { + new[] { ulong.MinValue, 1UL, ulong.MaxValue }, + Array.Empty(), + new[] { 77UL } + }, + """{"Prop":[[0,1,18446744073709551615],[],[77]]}""", + mappedCollection: true); + + protected class ULongArrayListType + { + public List Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_list_of_array_of_nullable_ulong_JSON_values() + => Can_read_and_write_JSON_value>( + nameof(NullableULongArrayListType.Prop), + new List + { + new ulong?[] { ulong.MinValue, null, ulong.MaxValue }, + Array.Empty(), + new ulong?[] { 77UL } + }, + """{"Prop":[[0,null,18446744073709551615],[],[77]]}""", + mappedCollection: true); + + protected class NullableULongArrayListType + { + public List Prop { get; set; } = null!; + } + + [ConditionalTheory] + [InlineData("""{"Prop":[["AAEC","AQ==","TQ=="],[],["Tg=="]]}""")] + public virtual Task Can_read_write_list_of_array_of_binary_JSON_values(string expected) + => Can_read_and_write_JSON_value>( + nameof(BinaryArrayListType.Prop), + new List + { + new[] { new byte[] { 0, 1, 2 }, [1], [77] }, + Array.Empty(), + new[] { new byte[] { 78 } } + }, + expected, + mappedCollection: true); + + protected class BinaryArrayListType + { + public IEnumerable Prop { get; set; } = null!; + } + + [ConditionalTheory] + [InlineData("""{"Prop":[["00000000-0000-0000-0000-000000000000","8c44242f-8e3f-4a20-8be8-98c7c1aadebd"],[],["ffffffff-ffff-ffff-ffff-ffffffffffff"]]}""")] + public virtual Task Can_read_write_list_of_array_of_GUID_JSON_values(string expected) + => Can_read_and_write_JSON_value>( + nameof(GuidArrayListType.Prop), + new List + { + new[] { new Guid("00000000-0000-0000-0000-000000000000"), new Guid("8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD") }, + Array.Empty(), + new[] { new Guid("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF") } + }, + expected, + mappedCollection: true); + + protected class GuidArrayListType + { + public List Prop { get; set; } = null!; + } + + [ConditionalTheory] + [InlineData("""{"Prop":[["00000000-0000-0000-0000-000000000000",null,"8c44242f-8e3f-4a20-8be8-98c7c1aadebd"],[],["ffffffff-ffff-ffff-ffff-ffffffffffff"]]}""")] + public virtual Task Can_read_write_list_of_array_of_nullable_GUID_JSON_values(string expected) + => Can_read_and_write_JSON_value>( + nameof(NullableGuidArrayListType.Prop), + new List + { + new Guid?[] { new Guid("00000000-0000-0000-0000-000000000000"), null, new Guid("8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD") }, + Array.Empty(), + new Guid?[] { new Guid("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF") } + }, + expected, + mappedCollection: true); + + protected class NullableGuidArrayListType + { + public List Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_array_of_list_of_int_JSON_values() + => Can_read_and_write_JSON_value[]>( + nameof(Int32ListArrayType.Prop), + new List[] + { + new() { int.MinValue, 0, int.MaxValue }, + new(), + new() { 77 } + }, + """{"Prop":[[-2147483648,0,2147483647],[],[77]]}""", + mappedCollection: true); + + protected class Int32ListArrayType + { + public IList[] Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_array_of_list_of_string_JSON_values() + => Can_read_and_write_JSON_value[]>( + nameof(StringListArrayType.Prop), + new List[] + { + new() { "X", "Y", "" }, + new(), + new() { "77" } + }, + """{"Prop":[["X","Y",""],[],["77"]]}""", + mappedCollection: true); + + protected class StringListArrayType + { + public List[] Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_array_of_list_of_IPAddress_JSON_values() + => Can_read_and_write_JSON_value[]>( + nameof(IpAddressListArrayType.Prop), + new Collection[] + { + new() { IPAddress.Parse("127.0.0.1"), IPAddress.Parse("2a00:23c7:c60f:4f01:ba43:6d5a:e648:7577") }, + new(), + new() { new IPAddress(0) } + }, + """{"Prop":[["127.0.0.1","2a00:23c7:c60f:4f01:ba43:6d5a:e648:7577"],[],["0.0.0.0"]]}""", + mappedCollection: true); + + protected class IpAddressListArrayType + { + public Collection[] Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_array_of_list_of_ulong_JSON_values() + => Can_read_and_write_JSON_value[]>( + nameof(ULongListArrayType.Prop), + new List[] + { + new() { ulong.MinValue, 1UL, ulong.MaxValue }, + new(), + new() { 77UL } + }, + """{"Prop":[[0,1,18446744073709551615],[],[77]]}""", + mappedCollection: true); + + protected class ULongListArrayType + { + public List[] Prop { get; set; } = null!; + } + + [ConditionalTheory] + [InlineData("""{"Prop":[["AAEC","AQ==","TQ=="],[],["Tg=="]]}""")] + public virtual Task Can_read_write_array_of_list_of_binary_JSON_values(string expected) + => Can_read_and_write_JSON_value[]>( + nameof(BinaryListArrayType.Prop), + new List[] + { + new() { new byte[] { 0, 1, 2 }, new byte[] { 1 }, new byte[] { 77 } }, + new(), + new() { new byte[] { 78 } } + }, + expected, + mappedCollection: true); + + protected class BinaryListArrayType + { + public List[] Prop { get; set; } = null!; + } + + [ConditionalTheory] + [InlineData("""{"Prop":[["00000000-0000-0000-0000-000000000000","8c44242f-8e3f-4a20-8be8-98c7c1aadebd"],[],["ffffffff-ffff-ffff-ffff-ffffffffffff"]]}""")] + public virtual Task Can_read_write_array_of_list_of_GUID_JSON_values(string expected) + => Can_read_and_write_JSON_value[]>( + nameof(GuidListArrayType.Prop), + new List[] + { + new() { new Guid("00000000-0000-0000-0000-000000000000"), new Guid("8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD") }, + new(), + new() { new Guid("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF") } + }, + expected, + mappedCollection: true); + + protected class GuidListArrayType + { + public ICollection[] Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_list_of_list_of_list_of_int_JSON_values() + => Can_read_and_write_JSON_value>>>( + nameof(Int32ListListListType.Prop), + new List>> + { + new() { new () { int.MinValue, 0, int.MaxValue }, new() { 77 } }, + new(), + new() { new () { 1, 2 }, new(), new() { 78, 79 } } + }, + """{"Prop":[[[-2147483648,0,2147483647],[77]],[],[[1,2],[],[78,79]]]}""", + mappedCollection: true); + + protected class Int32ListListListType + { + public List>> Prop { get; set; } = null!; + } + + + [ConditionalFact] + public virtual Task Can_read_write_array_of_array_of_array_of_int_JSON_values() + => Can_read_and_write_JSON_value( + nameof(Int32ArrayArrayArrayType.Prop), + [ + [[int.MinValue, 0, int.MaxValue], [77]], + [], + [[1, 2], Array.Empty(), [78, 79]] + ], + """{"Prop":[[[-2147483648,0,2147483647],[77]],[],[[1,2],[],[78,79]]]}""", + mappedCollection: true); + + protected class Int32ArrayArrayArrayType + { + public int[][][] Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_list_of_array_of_list_of_string_JSON_values() + => Can_read_and_write_JSON_value[]>>( + nameof(StringListArrayListType.Prop), + new List[]> + { + new List[] { new () { "int.MinValue", "", "int.MaxValue" }, new() { "77" } }, + Array.Empty>(), + new List[] { new () { "1", "2" }, new(), new() { "78", "79" } } + }, + """{"Prop":[[["int.MinValue","","int.MaxValue"],["77"]],[],[["1","2"],[],["78","79"]]]}""", + mappedCollection: true); + + protected class StringListArrayListType + { + public List[]> Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_array_of_list_of_array_of_string_JSON_values() + => Can_read_and_write_JSON_value[]>( + nameof(StringArrayListArrayType.Prop), + new List[] + { + new() { new[] { "int.MinValue", "", "int.MaxValue" }, new[] { "77" } }, + new(), + new() { new[] { "1", "2" }, Array.Empty(), new[] { "78", "79" } } + }, + """{"Prop":[[["int.MinValue","","int.MaxValue"],["77"]],[],[["1","2"],[],["78","79"]]]}""", + mappedCollection: true); + + protected class StringArrayListArrayType + { + public List[] Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_array_of_list_of_array_of_IPAddress_JSON_values() + => Can_read_and_write_JSON_value[]>( + nameof(IpAddressArrayListArrayType.Prop), + new List[] + { + new() { new[] { IPAddress.Parse("127.0.0.1"), IPAddress.Parse("2a00:23c7:c60f:4f01:ba43:6d5a:e648:7577") } }, + new(), + new() { new[] { new IPAddress(0) } } + }, + """{"Prop":[[["127.0.0.1","2a00:23c7:c60f:4f01:ba43:6d5a:e648:7577"]],[],[["0.0.0.0"]]]}""", + mappedCollection: true); + + protected class IpAddressArrayListArrayType + { + public List[] Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_list_of_array_of_list_of_IPAddress_JSON_values() + => Can_read_and_write_JSON_value[]>>( + nameof(IpAddressListArrayListType.Prop), + new List[]> + { + new List[] { new() { IPAddress.Parse("127.0.0.1"), IPAddress.Parse("2a00:23c7:c60f:4f01:ba43:6d5a:e648:7577") } }, + Array.Empty>(), + new List[] { new() { new IPAddress(0) } } + }, + """{"Prop":[[["127.0.0.1","2a00:23c7:c60f:4f01:ba43:6d5a:e648:7577"]],[],[["0.0.0.0"]]]}""", + mappedCollection: true); + + protected class IpAddressListArrayListType + { + public List[]> Prop { get; set; } = null!; + } + + [ConditionalFact] + public virtual Task Can_read_write_list_of_array_of_list_of_ulong_JSON_values() + => Can_read_and_write_JSON_value>>( + nameof(ULongListArrayListType.Prop), + new List> + { + new() { new[] { ulong.MinValue, 1UL, ulong.MaxValue } }, + new(), + new() { new[] { 77UL } } + }, + """{"Prop":[[[0,1,18446744073709551615]],[],[[77]]]}""", + mappedCollection: true); + + protected class ULongListArrayListType + { + public List> Prop { get; set; } = null!; + } + + [ConditionalTheory] + [InlineData("""{"Prop":[[[["AAEC","AQ==","TQ=="]],[],[[],[]]],[],[[[]],[["AAEC","AQ==","TQ=="]]]]}""")] + public virtual Task Can_read_write_list_of_array_of_list_of_array_of_binary_JSON_values(string expected) + => Can_read_and_write_JSON_value[]>>( + nameof(BinaryListArrayArrayListType.Prop), + new List[]> + { + new List[] { new() { new byte[][] { new byte[] { 0, 1, 2 }, [1], [77] } }, new(), new() { new byte[][] { }, Array.Empty() } }, + Array.Empty>(), + new List[] { new() { new byte[][] { } }, new() { new byte[][] { new byte[] { 0, 1, 2 }, [1], [77] } } }, + }, + expected, + mappedCollection: true); + + protected class BinaryListArrayArrayListType + { + public List[]> Prop { get; set; } = null!; + } + protected virtual async Task Can_read_and_write_JSON_value( string propertyName, TModel value, @@ -3521,7 +3957,6 @@ protected virtual async Task Can_read_and_write_JSON_value( Assert.Equal(typeof(TModel).GetSequenceType(), element.ClrType); Assert.Same(property, element.CollectionProperty); - Assert.Null(element.FindTypeMapping()!.ElementTypeMapping); bool elementNullable; if (element.ClrType.IsValueType) diff --git a/test/EFCore.Specification.Tests/ModelBuilding/ModelBuilderTest.ComplexType.cs b/test/EFCore.Specification.Tests/ModelBuilding/ModelBuilderTest.ComplexType.cs index 04fa6a0d0aa..0cfd9b9ad97 100644 --- a/test/EFCore.Specification.Tests/ModelBuilding/ModelBuilderTest.ComplexType.cs +++ b/test/EFCore.Specification.Tests/ModelBuilding/ModelBuilderTest.ComplexType.cs @@ -499,6 +499,9 @@ public virtual void Access_mode_can_be_overridden_at_entity_and_property_levels( [ConditionalFact] public virtual void Properties_can_have_provider_type_set() + => Properties_can_have_provider_type_set(); + + protected virtual void Properties_can_have_provider_type_set() { var modelBuilder = CreateModelBuilder(); @@ -529,7 +532,7 @@ public virtual void Properties_can_have_provider_type_set() var down = complexType.FindProperty("Down"); Assert.Same(typeof(byte[]), down.GetProviderClrType()); Assert.True(down.GetValueComparer().IsDefault()); - Assert.IsType>(down.GetProviderValueComparer()); + Assert.True(down.GetProviderValueComparer() is ValueComparer); var charm = complexType.FindProperty("Charm"); Assert.Same(typeof(long), charm.GetProviderClrType()); @@ -544,7 +547,7 @@ public virtual void Properties_can_have_provider_type_set() var top = complexType.FindProperty("Top"); Assert.Same(typeof(string), top.GetProviderClrType()); Assert.IsType>(top.GetValueComparer()); - Assert.IsType>(top.GetProviderValueComparer()); + Assert.True(top.GetProviderValueComparer() is ValueComparer); } [ConditionalFact] @@ -569,14 +572,17 @@ public virtual void Properties_can_have_provider_type_set_for_type() var model = modelBuilder.FinalizeModel(); var complexType = model.FindEntityType(typeof(ComplexProperties)).GetComplexProperties().Single().ComplexType; - Assert.Null(complexType.FindProperty("Up").GetProviderClrType()); - Assert.Same(typeof(byte[]), complexType.FindProperty("Down").GetProviderClrType()); - Assert.Null(complexType.FindProperty("Charm").GetProviderClrType()); - Assert.Same(typeof(byte[]), complexType.FindProperty("Strange").GetProviderClrType()); + Assert.Null(complexType.FindProperty("Up")!.GetProviderClrType()); + Assert.Same(typeof(byte[]), complexType.FindProperty("Down")!.GetProviderClrType()); + Assert.Null(complexType.FindProperty("Charm")!.GetProviderClrType()); + Assert.Same(typeof(byte[]), complexType.FindProperty("Strange")!.GetProviderClrType()); } [ConditionalFact] public virtual void Properties_can_have_non_generic_value_converter_set() + => Properties_can_have_non_generic_value_converter_set(); + + protected virtual void Properties_can_have_non_generic_value_converter_set() { var modelBuilder = CreateModelBuilder(); @@ -606,7 +612,7 @@ public virtual void Properties_can_have_non_generic_value_converter_set() var down = complexType.FindProperty("Down"); Assert.Same(stringConverter, down.GetValueConverter()); Assert.True(down.GetValueComparer().IsDefault()); - Assert.IsType>(down.GetProviderValueComparer()); + Assert.True(down.GetProviderValueComparer() is ValueComparer); var charm = complexType.FindProperty("Charm"); Assert.Same(intConverter, charm.GetValueConverter()); @@ -618,6 +624,9 @@ public virtual void Properties_can_have_non_generic_value_converter_set() [ConditionalFact] public virtual void Properties_can_have_custom_type_value_converter_type_set() + => Properties_can_have_custom_type_value_converter_type_set(); + + protected virtual void Properties_can_have_custom_type_value_converter_type_set() { var modelBuilder = CreateModelBuilder(); @@ -631,7 +640,7 @@ public virtual void Properties_can_have_custom_type_value_converter_type_set() { b.Property(e => e.Up).HasConversion>(); b.Property(e => e.Down) - .HasConversion, CustomValueComparer>(); + .HasConversion, CustomValueComparer>(); b.Property("Charm").HasConversion, CustomValueComparer>(); b.Property("Strange").HasConversion>(); b.Property("Strange").HasConversion(null, null); @@ -649,7 +658,7 @@ public virtual void Properties_can_have_custom_type_value_converter_type_set() var down = complexType.FindProperty("Down"); Assert.IsType(down.GetValueConverter()); Assert.IsType>(down.GetValueComparer()); - Assert.IsType>(down.GetProviderValueComparer()); + Assert.True(down.GetProviderValueComparer() is ValueComparer); var charm = complexType.FindProperty("Charm"); Assert.IsType>(charm.GetValueConverter()); @@ -662,7 +671,7 @@ public virtual void Properties_can_have_custom_type_value_converter_type_set() Assert.True(strange.GetProviderValueComparer().IsDefault()); } - private class UTF8StringToBytesConverter : StringToBytesConverter + protected class UTF8StringToBytesConverter : StringToBytesConverter { public UTF8StringToBytesConverter() : base(Encoding.UTF8) @@ -670,7 +679,7 @@ public UTF8StringToBytesConverter() } } - private class CustomValueComparer : ValueComparer + protected class CustomValueComparer : ValueComparer { public CustomValueComparer() : base(false) diff --git a/test/EFCore.Specification.Tests/ModelBuilding/ModelBuilderTest.NonRelationship.cs b/test/EFCore.Specification.Tests/ModelBuilding/ModelBuilderTest.NonRelationship.cs index 49537e75038..20c2e169235 100644 --- a/test/EFCore.Specification.Tests/ModelBuilding/ModelBuilderTest.NonRelationship.cs +++ b/test/EFCore.Specification.Tests/ModelBuilding/ModelBuilderTest.NonRelationship.cs @@ -6,6 +6,7 @@ using System.ComponentModel; using System.Dynamic; using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding; using Microsoft.EntityFrameworkCore.TestUtilities.Xunit; // ReSharper disable InconsistentNaming @@ -812,6 +813,9 @@ public virtual void Access_mode_can_be_overridden_at_entity_and_property_levels( [ConditionalFact] public virtual void Properties_can_have_provider_type_set() + => Properties_can_have_provider_type_set(); + + protected virtual void Properties_can_have_provider_type_set() { var modelBuilder = CreateModelBuilder(); @@ -822,7 +826,7 @@ public virtual void Properties_can_have_provider_type_set() b.Property(e => e.Down).HasConversion(); b.Property("Charm").HasConversion>(); b.Property("Strange").HasConversion( - new CustomValueComparer(), new CustomValueComparer()); + new CustomValueComparer(), new CustomValueComparer()); b.Property("Strange").HasConversion(null); b.Property("Top").HasConversion(new CustomValueComparer()); }); @@ -837,7 +841,7 @@ public virtual void Properties_can_have_provider_type_set() var down = entityType.FindProperty("Down")!; Assert.Same(typeof(byte[]), down.GetProviderClrType()); Assert.True(down.GetValueComparer()?.IsDefault()); - Assert.IsType>(down.GetProviderValueComparer()); + Assert.True(down.GetProviderValueComparer() is ValueComparer); var charm = entityType.FindProperty("Charm")!; Assert.Same(typeof(long), charm.GetProviderClrType()); @@ -880,6 +884,9 @@ public virtual void Properties_can_have_provider_type_set_for_type() [ConditionalFact] public virtual void Properties_can_have_non_generic_value_converter_set() + => Properties_can_have_non_generic_value_converter_set(); + + protected virtual void Properties_can_have_non_generic_value_converter_set() { var modelBuilder = CreateModelBuilder(); @@ -904,7 +911,7 @@ public virtual void Properties_can_have_non_generic_value_converter_set() var down = entityType.FindProperty("Down")!; Assert.Same(stringConverter, down.GetValueConverter()); Assert.True(down.GetValueComparer()?.IsDefault()); - Assert.IsType>(down.GetProviderValueComparer()); + Assert.True(down.GetProviderValueComparer() is ValueComparer); var charm = entityType.FindProperty("Charm")!; Assert.Same(intConverter, charm.GetValueConverter()); @@ -916,6 +923,9 @@ public virtual void Properties_can_have_non_generic_value_converter_set() [ConditionalFact] public virtual void Properties_can_have_custom_type_value_converter_type_set() + => Properties_can_have_custom_type_value_converter_type_set(); + + protected virtual void Properties_can_have_custom_type_value_converter_type_set() { var modelBuilder = CreateModelBuilder(); @@ -924,7 +934,7 @@ public virtual void Properties_can_have_custom_type_value_converter_type_set() { b.Property(e => e.Up).HasConversion>(); b.Property(e => e.Down) - .HasConversion, CustomValueComparer>(); + .HasConversion, CustomValueComparer>(); b.Property("Charm").HasConversion, CustomValueComparer>(); b.Property("Strange").HasConversion>(); b.Property("Strange").HasConversion(null, null); @@ -942,7 +952,7 @@ public virtual void Properties_can_have_custom_type_value_converter_type_set() var down = entityType.FindProperty("Down")!; Assert.IsType(down.GetValueConverter()); Assert.IsType>(down.GetValueComparer()); - Assert.IsType>(down.GetProviderValueComparer()); + Assert.True(down.GetProviderValueComparer() is ValueComparer); var charm = entityType.FindProperty("Charm")!; Assert.IsType>(charm.GetValueConverter()); @@ -955,7 +965,7 @@ public virtual void Properties_can_have_custom_type_value_converter_type_set() Assert.True(strange.GetProviderValueComparer()?.IsDefault()); } - private class UTF8StringToBytesConverter : StringToBytesConverter + protected class UTF8StringToBytesConverter : StringToBytesConverter { public UTF8StringToBytesConverter() : base(Encoding.UTF8) @@ -963,7 +973,7 @@ public UTF8StringToBytesConverter() } } - private class CustomValueComparer : ValueComparer + protected class CustomValueComparer : ValueComparer { public CustomValueComparer() : base(false) @@ -2856,6 +2866,21 @@ public virtual void Throws_for_primitive_collection_for_value_generator_that_can () => entityType.FindProperty("Down")!.GetValueGeneratorFactory()!(null!, null!)).Message); } + [ConditionalFact] + public virtual void Nested_primitive_collection_are_discovered_by_convention() + { + var modelBuilder = CreateModelBuilder(); + + modelBuilder.Ignore(); + modelBuilder.Entity(); + + var model = modelBuilder.FinalizeModel(); + + Assert.Empty( + model.FindEntityType(typeof(Gamma))!.GetProperties() + .Where(p => p.Name == "PrivateCollection")); + } + [ConditionalFact] protected virtual void Mapping_for_primitive_collection_ignores_ignored_array() { @@ -3035,7 +3060,6 @@ public virtual void Can_set_alternate_key_for_primitive_collection_on_an_entity_ Assert.NotNull(property.FieldInfo); Assert.NotNull(property.GetElementType()); var keys = entity.GetKeys(); - Assert.Equal(3, keys.Count()); Assert.Single(keys.Where(k => k.Properties.All(p => p == property))); } @@ -3049,8 +3073,7 @@ public virtual void Can_call_PrimitiveCollection_on_an_entity_with_fields() var model = modelBuilder.FinalizeModel(); var properties = model.FindEntityType(typeof(EntityWithFields))!.GetProperties(); - var property = Assert.Single(properties); - Assert.Equal(nameof(EntityWithFields.CollectionId), property.Name); + var property = properties.Single(e => e.Name == nameof(EntityWithFields.CollectionId)); Assert.Null(property.PropertyInfo); Assert.NotNull(property.FieldInfo); Assert.NotNull(property.GetElementType()); @@ -3111,11 +3134,8 @@ public virtual void Element_types_can_be_made_required() b.PrimitiveCollection(e => e.Up).ElementType().IsRequired(); b.PrimitiveCollection(e => e.Down).ElementType().IsRequired(false); b.PrimitiveCollection>("Charm").ElementType().IsRequired(); - ; b.PrimitiveCollection>("Strange").ElementType().IsRequired(); - ; - b.PrimitiveCollection>("Stranger").ElementType().IsRequired(); - ; // Still optional since no NRT metadata available + b.PrimitiveCollection>("Stranger").ElementType().IsRequired(); // Still optional since no NRT metadata available }); var entityType = modelBuilder.FinalizeModel().FindEntityType(typeof(CollectionQuarks))!; diff --git a/test/EFCore.Specification.Tests/Query/NonSharedPrimitiveCollectionsQueryTestBase.cs b/test/EFCore.Specification.Tests/Query/NonSharedPrimitiveCollectionsQueryTestBase.cs index 6357dfe2c77..80f63e43914 100644 --- a/test/EFCore.Specification.Tests/Query/NonSharedPrimitiveCollectionsQueryTestBase.cs +++ b/test/EFCore.Specification.Tests/Query/NonSharedPrimitiveCollectionsQueryTestBase.cs @@ -95,13 +95,6 @@ public virtual Task Array_of_enum() private enum MyEnum { Label1, Label2 } - [ConditionalFact] - public virtual async Task Array_of_array_is_not_supported() - { - var exception = await Assert.ThrowsAsync(() => TestArray([1, 2, 3], new[] { 4, 5, 6 })); - Assert.Equal(CoreStrings.PropertyNotMapped("int[][]", "TestEntity", "SomeArray"), exception.Message); - } - [ConditionalFact] public virtual async Task Multidimensional_array_is_not_supported() { diff --git a/test/EFCore.Specification.Tests/Scaffolding/CompiledModelTestBase.cs b/test/EFCore.Specification.Tests/Scaffolding/CompiledModelTestBase.cs index 85782222257..7686ac38185 100644 --- a/test/EFCore.Specification.Tests/Scaffolding/CompiledModelTestBase.cs +++ b/test/EFCore.Specification.Tests/Scaffolding/CompiledModelTestBase.cs @@ -1035,6 +1035,32 @@ public class ManyTypes public EnumU32?[] NullableEnumU32AsStringArray { get; set; } = null!; public EnumU64?[] NullableEnumU64AsStringArray { get; set; } = null!; + public bool[][] BoolNestedCollection { get; set; } = null!; + public List UInt8NestedCollection { get; set; } = null!; + public sbyte[][][] Int8NestedCollection { get; set; } = null!; + public int[][] Int32NestedCollection { get; set; } = null!; + public IList[] Int64NestedCollection { get; set; } = null!; + public char[][] CharNestedCollection { get; set; } = null!; + public ICollection GuidNestedCollection { get; set; } = null!; + public string[][] StringNestedCollection { get; set; } = null!; + public byte[][][] BytesNestedCollection { get; set; } = null!; + + public byte?[][] NullableUInt8NestedCollection { get; set; } = null!; + public int?[][] NullableInt32NestedCollection { get; set; } = null!; + public List NullableInt64NestedCollection { get; set; } = null!; + public Guid?[][] NullableGuidNestedCollection { get; set; } = null!; + public string?[][] NullableStringNestedCollection { get; set; } = null!; + public byte[]?[][] NullableBytesNestedCollection { get; set; } = null!; + public IEnumerable NullablePhysicalAddressNestedCollection { get; set; } = null!; + + public Enum8[][] Enum8NestedCollection { get; set; } = null!; + public List[][] Enum32NestedCollection { get; set; } = null!; + public EnumU64[][] EnumU64NestedCollection { get; set; } = null!; + + public Enum8?[][] NullableEnum8NestedCollection { get; set; } = null!; + public Enum32?[][][] NullableEnum32NestedCollection { get; set; } = null!; + public EnumU64?[][] NullableEnumU64NestedCollection { get; set; } = null!; + public bool BoolToStringConverterProperty { get; set; } public bool BoolToTwoValuesConverterProperty { get; set; } public bool BoolToZeroOneConverterProperty { get; set; } diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/JsonQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/JsonQuerySqlServerTest.cs index cb15995e287..efc4c26b779 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/JsonQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/JsonQuerySqlServerTest.cs @@ -2170,7 +2170,7 @@ public override async Task Json_all_types_entity_projection(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] """); } @@ -2203,7 +2203,7 @@ public override async Task Json_boolean_predicate(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestBoolean') AS bit) = CAST(1 AS bit) """); @@ -2215,7 +2215,7 @@ public override async Task Json_boolean_predicate_negated(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestBoolean') AS bit) = CAST(0 AS bit) """); @@ -2252,7 +2252,7 @@ public override async Task Json_predicate_on_default_string(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE JSON_VALUE([j].[Reference], '$.TestDefaultString') <> N'MyDefaultStringInReference1' OR JSON_VALUE([j].[Reference], '$.TestDefaultString') IS NULL """); @@ -2264,7 +2264,7 @@ public override async Task Json_predicate_on_max_length_string(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE JSON_VALUE([j].[Reference], '$.TestMaxLengthString') <> N'Foo' OR JSON_VALUE([j].[Reference], '$.TestMaxLengthString') IS NULL """); @@ -2276,7 +2276,7 @@ public override async Task Json_predicate_on_string_condition(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CASE WHEN CAST(JSON_VALUE([j].[Reference], '$.TestBoolean') AS bit) = CAST(0 AS bit) THEN JSON_VALUE([j].[Reference], '$.TestMaxLengthString') @@ -2291,7 +2291,7 @@ public override async Task Json_predicate_on_byte(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestByte') AS tinyint) <> CAST(3 AS tinyint) OR CAST(JSON_VALUE([j].[Reference], '$.TestByte') AS tinyint) IS NULL """); @@ -2303,7 +2303,7 @@ public override async Task Json_predicate_on_character(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE JSON_VALUE([j].[Reference], '$.TestCharacter') <> N'z' OR JSON_VALUE([j].[Reference], '$.TestCharacter') IS NULL """); @@ -2315,7 +2315,7 @@ public override async Task Json_predicate_on_datetime(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestDateTime') AS datetime2) <> '2000-01-03T00:00:00.0000000' OR CAST(JSON_VALUE([j].[Reference], '$.TestDateTime') AS datetime2) IS NULL """); @@ -2327,7 +2327,7 @@ public override async Task Json_predicate_on_datetimeoffset(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestDateTimeOffset') AS datetimeoffset) <> '2000-01-04T00:00:00.0000000+03:02' OR CAST(JSON_VALUE([j].[Reference], '$.TestDateTimeOffset') AS datetimeoffset) IS NULL """); @@ -2339,7 +2339,7 @@ public override async Task Json_predicate_on_decimal(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestDecimal') AS decimal(18,3)) <> 1.35 OR CAST(JSON_VALUE([j].[Reference], '$.TestDecimal') AS decimal(18,3)) IS NULL """); @@ -2351,7 +2351,7 @@ public override async Task Json_predicate_on_double(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestDouble') AS float) <> 33.25E0 OR CAST(JSON_VALUE([j].[Reference], '$.TestDouble') AS float) IS NULL """); @@ -2363,7 +2363,7 @@ public override async Task Json_predicate_on_enum(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestEnum') AS int) <> 2 OR CAST(JSON_VALUE([j].[Reference], '$.TestEnum') AS int) IS NULL """); @@ -2375,7 +2375,7 @@ public override async Task Json_predicate_on_enumwithintconverter(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestEnumWithIntConverter') AS int) <> -3 OR CAST(JSON_VALUE([j].[Reference], '$.TestEnumWithIntConverter') AS int) IS NULL """); @@ -2387,7 +2387,7 @@ public override async Task Json_predicate_on_guid(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestGuid') AS uniqueidentifier) <> '00000000-0000-0000-0000-000000000000' OR CAST(JSON_VALUE([j].[Reference], '$.TestGuid') AS uniqueidentifier) IS NULL """); @@ -2399,7 +2399,7 @@ public override async Task Json_predicate_on_int16(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestInt16') AS smallint) <> CAST(3 AS smallint) OR CAST(JSON_VALUE([j].[Reference], '$.TestInt16') AS smallint) IS NULL """); @@ -2411,7 +2411,7 @@ public override async Task Json_predicate_on_int32(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestInt32') AS int) <> 33 OR CAST(JSON_VALUE([j].[Reference], '$.TestInt32') AS int) IS NULL """); @@ -2423,7 +2423,7 @@ public override async Task Json_predicate_on_int64(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestInt64') AS bigint) <> CAST(333 AS bigint) OR CAST(JSON_VALUE([j].[Reference], '$.TestInt64') AS bigint) IS NULL """); @@ -2435,7 +2435,7 @@ public override async Task Json_predicate_on_nullableenum1(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestNullableEnum') AS int) <> -1 OR CAST(JSON_VALUE([j].[Reference], '$.TestNullableEnum') AS int) IS NULL """); @@ -2447,7 +2447,7 @@ public override async Task Json_predicate_on_nullableenum2(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestNullableEnum') AS int) IS NOT NULL """); @@ -2459,7 +2459,7 @@ public override async Task Json_predicate_on_nullableenumwithconverter1(bool asy AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestNullableEnumWithIntConverter') AS int) <> 2 OR CAST(JSON_VALUE([j].[Reference], '$.TestNullableEnumWithIntConverter') AS int) IS NULL """); @@ -2471,7 +2471,7 @@ public override async Task Json_predicate_on_nullableenumwithconverter2(bool asy AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestNullableEnumWithIntConverter') AS int) IS NOT NULL """); @@ -2483,7 +2483,7 @@ public override async Task Json_predicate_on_nullableenumwithconverterthathandle AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE JSON_VALUE([j].[Reference], '$.TestNullableEnumWithConverterThatHandlesNulls') <> N'One' OR JSON_VALUE([j].[Reference], '$.TestNullableEnumWithConverterThatHandlesNulls') IS NULL """); @@ -2505,7 +2505,7 @@ public override async Task Json_predicate_on_nullableint321(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestNullableInt32') AS int) <> 100 OR CAST(JSON_VALUE([j].[Reference], '$.TestNullableInt32') AS int) IS NULL """); @@ -2517,7 +2517,7 @@ public override async Task Json_predicate_on_nullableint322(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestNullableInt32') AS int) IS NOT NULL """); @@ -2529,7 +2529,7 @@ public override async Task Json_predicate_on_signedbyte(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestSignedByte') AS smallint) <> CAST(100 AS smallint) OR CAST(JSON_VALUE([j].[Reference], '$.TestSignedByte') AS smallint) IS NULL """); @@ -2541,7 +2541,7 @@ public override async Task Json_predicate_on_single(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestSingle') AS real) <> CAST(10.4 AS real) OR CAST(JSON_VALUE([j].[Reference], '$.TestSingle') AS real) IS NULL """); @@ -2553,7 +2553,7 @@ public override async Task Json_predicate_on_timespan(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestTimeSpan') AS time) <> '03:02:00' OR CAST(JSON_VALUE([j].[Reference], '$.TestTimeSpan') AS time) IS NULL """); @@ -2565,7 +2565,7 @@ public override async Task Json_predicate_on_dateonly(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestDateOnly') AS date) <> '0003-02-01' OR CAST(JSON_VALUE([j].[Reference], '$.TestDateOnly') AS date) IS NULL """); @@ -2577,7 +2577,7 @@ public override async Task Json_predicate_on_timeonly(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestTimeOnly') AS time) <> '03:02:00' OR CAST(JSON_VALUE([j].[Reference], '$.TestTimeOnly') AS time) IS NULL """); @@ -2589,7 +2589,7 @@ public override async Task Json_predicate_on_unisgnedint16(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestUnsignedInt16') AS int) <> 100 OR CAST(JSON_VALUE([j].[Reference], '$.TestUnsignedInt16') AS int) IS NULL """); @@ -2601,7 +2601,7 @@ public override async Task Json_predicate_on_unsignedint32(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestUnsignedInt32') AS bigint) <> CAST(1000 AS bigint) OR CAST(JSON_VALUE([j].[Reference], '$.TestUnsignedInt32') AS bigint) IS NULL """); @@ -2613,7 +2613,7 @@ public override async Task Json_predicate_on_unsignedint64(bool async) AssertSql( """ -SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE CAST(JSON_VALUE([j].[Reference], '$.TestUnsignedInt64') AS decimal(20,0)) <> 10000.0 OR CAST(JSON_VALUE([j].[Reference], '$.TestUnsignedInt64') AS decimal(20,0)) IS NULL """); diff --git a/test/EFCore.SqlServer.FunctionalTests/Query/NonSharedPrimitiveCollectionsQuerySqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Query/NonSharedPrimitiveCollectionsQuerySqlServerTest.cs index a956cb2131e..fbaa5a4fd4d 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Query/NonSharedPrimitiveCollectionsQuerySqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Query/NonSharedPrimitiveCollectionsQuerySqlServerTest.cs @@ -302,10 +302,6 @@ FROM OPENJSON([t].[SomeArray]) WITH ([value] int '$') AS [s] """); } - [ConditionalFact] - public override Task Array_of_array_is_not_supported() - => base.Array_of_array_is_not_supported(); - [ConditionalFact] public override Task Multidimensional_array_is_not_supported() => base.Multidimensional_array_is_not_supported(); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextModelBuilder.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextModelBuilder.cs index 3f577144b7b..5761a7b667d 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextModelBuilder.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/DbContextModelBuilder.cs @@ -185,6 +185,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Bool", boolColumnBase); var boolArrayColumnBase = new ColumnBase("BoolArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("BoolArray", boolArrayColumnBase); + var boolNestedCollectionColumnBase = new ColumnBase("BoolNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("BoolNestedCollection", boolNestedCollectionColumnBase); var boolToStringConverterPropertyColumnBase = new ColumnBase("BoolToStringConverterProperty", "nvarchar(1)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("BoolToStringConverterProperty", boolToStringConverterPropertyColumnBase); var boolToTwoValuesConverterPropertyColumnBase = new ColumnBase("BoolToTwoValuesConverterProperty", "tinyint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -195,6 +197,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Bytes", bytesColumnBase); var bytesArrayColumnBase = new ColumnBase("BytesArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("BytesArray", bytesArrayColumnBase); + var bytesNestedCollectionColumnBase = new ColumnBase("BytesNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("BytesNestedCollection", bytesNestedCollectionColumnBase); var bytesToStringConverterPropertyColumnBase = new ColumnBase("BytesToStringConverterProperty", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("BytesToStringConverterProperty", bytesToStringConverterPropertyColumnBase); var castingConverterPropertyColumnBase = new ColumnBase("CastingConverterProperty", "decimal(18,2)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -203,6 +207,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Char", charColumnBase); var charArrayColumnBase = new ColumnBase("CharArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("CharArray", charArrayColumnBase); + var charNestedCollectionColumnBase = new ColumnBase("CharNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("CharNestedCollection", charNestedCollectionColumnBase); var charToStringConverterPropertyColumnBase = new ColumnBase("CharToStringConverterProperty", "nchar(1)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("CharToStringConverterProperty", charToStringConverterPropertyColumnBase); var dateOnlyColumnBase = new ColumnBase("DateOnly", "date", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -267,6 +273,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum32AsStringCollection", enum32AsStringCollectionColumnBase); var enum32CollectionColumnBase = new ColumnBase("Enum32Collection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum32Collection", enum32CollectionColumnBase); + var enum32NestedCollectionColumnBase = new ColumnBase("Enum32NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum32NestedCollection", enum32NestedCollectionColumnBase); var enum64ColumnBase = new ColumnBase("Enum64", "bigint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum64", enum64ColumnBase); var enum64ArrayColumnBase = new ColumnBase("Enum64Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -291,6 +299,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum8AsStringCollection", enum8AsStringCollectionColumnBase); var enum8CollectionColumnBase = new ColumnBase("Enum8Collection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum8Collection", enum8CollectionColumnBase); + var enum8NestedCollectionColumnBase = new ColumnBase("Enum8NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum8NestedCollection", enum8NestedCollectionColumnBase); var enumToNumberConverterPropertyColumnBase = new ColumnBase("EnumToNumberConverterProperty", "int", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("EnumToNumberConverterProperty", enumToNumberConverterPropertyColumnBase); var enumToStringConverterPropertyColumnBase = new ColumnBase("EnumToStringConverterProperty", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -331,6 +341,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("EnumU64AsStringCollection", enumU64AsStringCollectionColumnBase); var enumU64CollectionColumnBase = new ColumnBase("EnumU64Collection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("EnumU64Collection", enumU64CollectionColumnBase); + var enumU64NestedCollectionColumnBase = new ColumnBase("EnumU64NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("EnumU64NestedCollection", enumU64NestedCollectionColumnBase); var enumU8ColumnBase = new ColumnBase("EnumU8", "tinyint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("EnumU8", enumU8ColumnBase); var enumU8ArrayColumnBase = new ColumnBase("EnumU8Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -351,6 +363,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Guid", guidColumnBase); var guidArrayColumnBase = new ColumnBase("GuidArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("GuidArray", guidArrayColumnBase); + var guidNestedCollectionColumnBase = new ColumnBase("GuidNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("GuidNestedCollection", guidNestedCollectionColumnBase); var guidToBytesConverterPropertyColumnBase = new ColumnBase("GuidToBytesConverterProperty", "varbinary(16)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("GuidToBytesConverterProperty", guidToBytesConverterPropertyColumnBase); var guidToStringConverterPropertyColumnBase = new ColumnBase("GuidToStringConverterProperty", "nvarchar(36)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -373,14 +387,20 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int32", int32ColumnBase); var int32ArrayColumnBase = new ColumnBase("Int32Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int32Array", int32ArrayColumnBase); + var int32NestedCollectionColumnBase = new ColumnBase("Int32NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int32NestedCollection", int32NestedCollectionColumnBase); var int64ColumnBase = new ColumnBase("Int64", "bigint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int64", int64ColumnBase); var int64ArrayColumnBase = new ColumnBase("Int64Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int64Array", int64ArrayColumnBase); + var int64NestedCollectionColumnBase = new ColumnBase("Int64NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int64NestedCollection", int64NestedCollectionColumnBase); var int8ColumnBase = new ColumnBase("Int8", "smallint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int8", int8ColumnBase); var int8ArrayColumnBase = new ColumnBase("Int8Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int8Array", int8ArrayColumnBase); + var int8NestedCollectionColumnBase = new ColumnBase("Int8NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int8NestedCollection", int8NestedCollectionColumnBase); var intNumberToBytesConverterPropertyColumnBase = new ColumnBase("IntNumberToBytesConverterProperty", "varbinary(4)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("IntNumberToBytesConverterProperty", intNumberToBytesConverterPropertyColumnBase); var intNumberToStringConverterPropertyColumnBase = new ColumnBase("IntNumberToStringConverterProperty", "nvarchar(64)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -404,6 +424,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableBytes", nullableBytesColumnBase); var nullableBytesArrayColumnBase = new ColumnBase("NullableBytesArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableBytesArray", nullableBytesArrayColumnBase); + var nullableBytesNestedCollectionColumnBase = new ColumnBase("NullableBytesNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableBytesNestedCollection", nullableBytesNestedCollectionColumnBase); var nullableCharColumnBase = new ColumnBase("NullableChar", "nvarchar(1)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -475,6 +497,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnum32AsStringCollection", nullableEnum32AsStringCollectionColumnBase); var nullableEnum32CollectionColumnBase = new ColumnBase("NullableEnum32Collection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnum32Collection", nullableEnum32CollectionColumnBase); + var nullableEnum32NestedCollectionColumnBase = new ColumnBase("NullableEnum32NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnum32NestedCollection", nullableEnum32NestedCollectionColumnBase); var nullableEnum64ColumnBase = new ColumnBase("NullableEnum64", "bigint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -511,6 +535,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnum8AsStringCollection", nullableEnum8AsStringCollectionColumnBase); var nullableEnum8CollectionColumnBase = new ColumnBase("NullableEnum8Collection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnum8Collection", nullableEnum8CollectionColumnBase); + var nullableEnum8NestedCollectionColumnBase = new ColumnBase("NullableEnum8NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnum8NestedCollection", nullableEnum8NestedCollectionColumnBase); var nullableEnumU16ColumnBase = new ColumnBase("NullableEnumU16", "int", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -565,6 +591,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnumU64AsStringCollection", nullableEnumU64AsStringCollectionColumnBase); var nullableEnumU64CollectionColumnBase = new ColumnBase("NullableEnumU64Collection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnumU64Collection", nullableEnumU64CollectionColumnBase); + var nullableEnumU64NestedCollectionColumnBase = new ColumnBase("NullableEnumU64NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnumU64NestedCollection", nullableEnumU64NestedCollectionColumnBase); var nullableEnumU8ColumnBase = new ColumnBase("NullableEnumU8", "tinyint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -597,6 +625,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableGuid", nullableGuidColumnBase); var nullableGuidArrayColumnBase = new ColumnBase("NullableGuidArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableGuidArray", nullableGuidArrayColumnBase); + var nullableGuidNestedCollectionColumnBase = new ColumnBase("NullableGuidNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableGuidNestedCollection", nullableGuidNestedCollectionColumnBase); var nullableIPAddressColumnBase = new ColumnBase("NullableIPAddress", "nvarchar(45)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -618,6 +648,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableInt32", nullableInt32ColumnBase); var nullableInt32ArrayColumnBase = new ColumnBase("NullableInt32Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableInt32Array", nullableInt32ArrayColumnBase); + var nullableInt32NestedCollectionColumnBase = new ColumnBase("NullableInt32NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableInt32NestedCollection", nullableInt32NestedCollectionColumnBase); var nullableInt64ColumnBase = new ColumnBase("NullableInt64", "bigint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -625,6 +657,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableInt64", nullableInt64ColumnBase); var nullableInt64ArrayColumnBase = new ColumnBase("NullableInt64Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableInt64Array", nullableInt64ArrayColumnBase); + var nullableInt64NestedCollectionColumnBase = new ColumnBase("NullableInt64NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableInt64NestedCollection", nullableInt64NestedCollectionColumnBase); var nullableInt8ColumnBase = new ColumnBase("NullableInt8", "smallint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -639,6 +673,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullablePhysicalAddress", nullablePhysicalAddressColumnBase); var nullablePhysicalAddressArrayColumnBase = new ColumnBase("NullablePhysicalAddressArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullablePhysicalAddressArray", nullablePhysicalAddressArrayColumnBase); + var nullablePhysicalAddressNestedCollectionColumnBase = new ColumnBase("NullablePhysicalAddressNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullablePhysicalAddressNestedCollection", nullablePhysicalAddressNestedCollectionColumnBase); var nullableStringColumnBase = new ColumnBase("NullableString", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -646,6 +682,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableString", nullableStringColumnBase); var nullableStringArrayColumnBase = new ColumnBase("NullableStringArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableStringArray", nullableStringArrayColumnBase); + var nullableStringNestedCollectionColumnBase = new ColumnBase("NullableStringNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableStringNestedCollection", nullableStringNestedCollectionColumnBase); var nullableTimeOnlyColumnBase = new ColumnBase("NullableTimeOnly", "time", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -688,6 +726,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableUInt8", nullableUInt8ColumnBase); var nullableUInt8ArrayColumnBase = new ColumnBase("NullableUInt8Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableUInt8Array", nullableUInt8ArrayColumnBase); + var nullableUInt8NestedCollectionColumnBase = new ColumnBase("NullableUInt8NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableUInt8NestedCollection", nullableUInt8NestedCollectionColumnBase); var nullableUriColumnBase = new ColumnBase("NullableUri", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -707,6 +747,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("String", stringColumnBase); var stringArrayColumnBase = new ColumnBase("StringArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("StringArray", stringArrayColumnBase); + var stringNestedCollectionColumnBase = new ColumnBase("StringNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("StringNestedCollection", stringNestedCollectionColumnBase); var stringToBoolConverterPropertyColumnBase = new ColumnBase("StringToBoolConverterProperty", "bit", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("StringToBoolConverterProperty", stringToBoolConverterPropertyColumnBase); var stringToBytesConverterPropertyColumnBase = new ColumnBase("StringToBytesConverterProperty", "varbinary(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) @@ -770,6 +812,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("UInt8", uInt8ColumnBase); var uInt8ArrayColumnBase = new ColumnBase("UInt8Array", "varbinary(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("UInt8Array", uInt8ArrayColumnBase); + var uInt8NestedCollectionColumnBase = new ColumnBase("UInt8NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("UInt8NestedCollection", uInt8NestedCollectionColumnBase); var uriColumnBase = new ColumnBase("Uri", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Uri", uriColumnBase); var uriArrayColumnBase = new ColumnBase("UriArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -783,15 +827,18 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)idColumnBase0, manyTypes.FindProperty("Id")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)boolColumnBase, manyTypes.FindProperty("Bool")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)boolArrayColumnBase, manyTypes.FindProperty("BoolArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)boolNestedCollectionColumnBase, manyTypes.FindProperty("BoolNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)boolToStringConverterPropertyColumnBase, manyTypes.FindProperty("BoolToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)boolToTwoValuesConverterPropertyColumnBase, manyTypes.FindProperty("BoolToTwoValuesConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)boolToZeroOneConverterPropertyColumnBase, manyTypes.FindProperty("BoolToZeroOneConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)bytesColumnBase, manyTypes.FindProperty("Bytes")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)bytesArrayColumnBase, manyTypes.FindProperty("BytesArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)bytesNestedCollectionColumnBase, manyTypes.FindProperty("BytesNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)bytesToStringConverterPropertyColumnBase, manyTypes.FindProperty("BytesToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)castingConverterPropertyColumnBase, manyTypes.FindProperty("CastingConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)charColumnBase, manyTypes.FindProperty("Char")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)charArrayColumnBase, manyTypes.FindProperty("CharArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)charNestedCollectionColumnBase, manyTypes.FindProperty("CharNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)charToStringConverterPropertyColumnBase, manyTypes.FindProperty("CharToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)dateOnlyColumnBase, manyTypes.FindProperty("DateOnly")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)dateOnlyArrayColumnBase, manyTypes.FindProperty("DateOnlyArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -824,6 +871,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)enum32AsStringArrayColumnBase, manyTypes.FindProperty("Enum32AsStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum32AsStringCollectionColumnBase, manyTypes.FindProperty("Enum32AsStringCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum32CollectionColumnBase, manyTypes.FindProperty("Enum32Collection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)enum32NestedCollectionColumnBase, manyTypes.FindProperty("Enum32NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum64ColumnBase, manyTypes.FindProperty("Enum64")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum64ArrayColumnBase, manyTypes.FindProperty("Enum64Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum64AsStringColumnBase, manyTypes.FindProperty("Enum64AsString")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -836,6 +884,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)enum8AsStringArrayColumnBase, manyTypes.FindProperty("Enum8AsStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum8AsStringCollectionColumnBase, manyTypes.FindProperty("Enum8AsStringCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum8CollectionColumnBase, manyTypes.FindProperty("Enum8Collection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)enum8NestedCollectionColumnBase, manyTypes.FindProperty("Enum8NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumToNumberConverterPropertyColumnBase, manyTypes.FindProperty("EnumToNumberConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumToStringConverterPropertyColumnBase, manyTypes.FindProperty("EnumToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumU16ColumnBase, manyTypes.FindProperty("EnumU16")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -856,6 +905,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)enumU64AsStringArrayColumnBase, manyTypes.FindProperty("EnumU64AsStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumU64AsStringCollectionColumnBase, manyTypes.FindProperty("EnumU64AsStringCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumU64CollectionColumnBase, manyTypes.FindProperty("EnumU64Collection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)enumU64NestedCollectionColumnBase, manyTypes.FindProperty("EnumU64NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumU8ColumnBase, manyTypes.FindProperty("EnumU8")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumU8ArrayColumnBase, manyTypes.FindProperty("EnumU8Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumU8AsStringColumnBase, manyTypes.FindProperty("EnumU8AsString")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -866,6 +916,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)floatArrayColumnBase, manyTypes.FindProperty("FloatArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)guidColumnBase, manyTypes.FindProperty("Guid")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)guidArrayColumnBase, manyTypes.FindProperty("GuidArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)guidNestedCollectionColumnBase, manyTypes.FindProperty("GuidNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)guidToBytesConverterPropertyColumnBase, manyTypes.FindProperty("GuidToBytesConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)guidToStringConverterPropertyColumnBase, manyTypes.FindProperty("GuidToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)iPAddressColumnBase, manyTypes.FindProperty("IPAddress")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -876,10 +927,13 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)int16ArrayColumnBase, manyTypes.FindProperty("Int16Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)int32ColumnBase, manyTypes.FindProperty("Int32")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)int32ArrayColumnBase, manyTypes.FindProperty("Int32Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)int32NestedCollectionColumnBase, manyTypes.FindProperty("Int32NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)int64ColumnBase, manyTypes.FindProperty("Int64")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)int64ArrayColumnBase, manyTypes.FindProperty("Int64Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)int64NestedCollectionColumnBase, manyTypes.FindProperty("Int64NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)int8ColumnBase, manyTypes.FindProperty("Int8")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)int8ArrayColumnBase, manyTypes.FindProperty("Int8Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)int8NestedCollectionColumnBase, manyTypes.FindProperty("Int8NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)intNumberToBytesConverterPropertyColumnBase, manyTypes.FindProperty("IntNumberToBytesConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)intNumberToStringConverterPropertyColumnBase, manyTypes.FindProperty("IntNumberToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullIntToNullStringConverterPropertyColumnBase, manyTypes.FindProperty("NullIntToNullStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -887,6 +941,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)nullableBoolArrayColumnBase, manyTypes.FindProperty("NullableBoolArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableBytesColumnBase, manyTypes.FindProperty("NullableBytes")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableBytesArrayColumnBase, manyTypes.FindProperty("NullableBytesArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableBytesNestedCollectionColumnBase, manyTypes.FindProperty("NullableBytesNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableCharColumnBase, manyTypes.FindProperty("NullableChar")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableCharArrayColumnBase, manyTypes.FindProperty("NullableCharArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableDateOnlyColumnBase, manyTypes.FindProperty("NullableDateOnly")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -909,6 +964,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum32AsStringArrayColumnBase, manyTypes.FindProperty("NullableEnum32AsStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum32AsStringCollectionColumnBase, manyTypes.FindProperty("NullableEnum32AsStringCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum32CollectionColumnBase, manyTypes.FindProperty("NullableEnum32Collection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum32NestedCollectionColumnBase, manyTypes.FindProperty("NullableEnum32NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum64ColumnBase, manyTypes.FindProperty("NullableEnum64")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum64ArrayColumnBase, manyTypes.FindProperty("NullableEnum64Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum64AsStringColumnBase, manyTypes.FindProperty("NullableEnum64AsString")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -921,6 +977,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum8AsStringArrayColumnBase, manyTypes.FindProperty("NullableEnum8AsStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum8AsStringCollectionColumnBase, manyTypes.FindProperty("NullableEnum8AsStringCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum8CollectionColumnBase, manyTypes.FindProperty("NullableEnum8Collection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum8NestedCollectionColumnBase, manyTypes.FindProperty("NullableEnum8NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU16ColumnBase, manyTypes.FindProperty("NullableEnumU16")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU16ArrayColumnBase, manyTypes.FindProperty("NullableEnumU16Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU16AsStringColumnBase, manyTypes.FindProperty("NullableEnumU16AsString")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -939,6 +996,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU64AsStringArrayColumnBase, manyTypes.FindProperty("NullableEnumU64AsStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU64AsStringCollectionColumnBase, manyTypes.FindProperty("NullableEnumU64AsStringCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU64CollectionColumnBase, manyTypes.FindProperty("NullableEnumU64Collection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU64NestedCollectionColumnBase, manyTypes.FindProperty("NullableEnumU64NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU8ColumnBase, manyTypes.FindProperty("NullableEnumU8")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU8ArrayColumnBase, manyTypes.FindProperty("NullableEnumU8Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU8AsStringColumnBase, manyTypes.FindProperty("NullableEnumU8AsString")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -949,20 +1007,25 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)nullableFloatArrayColumnBase, manyTypes.FindProperty("NullableFloatArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableGuidColumnBase, manyTypes.FindProperty("NullableGuid")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableGuidArrayColumnBase, manyTypes.FindProperty("NullableGuidArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableGuidNestedCollectionColumnBase, manyTypes.FindProperty("NullableGuidNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableIPAddressColumnBase, manyTypes.FindProperty("NullableIPAddress")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableIPAddressArrayColumnBase, manyTypes.FindProperty("NullableIPAddressArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt16ColumnBase, manyTypes.FindProperty("NullableInt16")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt16ArrayColumnBase, manyTypes.FindProperty("NullableInt16Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt32ColumnBase, manyTypes.FindProperty("NullableInt32")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt32ArrayColumnBase, manyTypes.FindProperty("NullableInt32Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableInt32NestedCollectionColumnBase, manyTypes.FindProperty("NullableInt32NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt64ColumnBase, manyTypes.FindProperty("NullableInt64")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt64ArrayColumnBase, manyTypes.FindProperty("NullableInt64Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableInt64NestedCollectionColumnBase, manyTypes.FindProperty("NullableInt64NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt8ColumnBase, manyTypes.FindProperty("NullableInt8")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt8ArrayColumnBase, manyTypes.FindProperty("NullableInt8Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullablePhysicalAddressColumnBase, manyTypes.FindProperty("NullablePhysicalAddress")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullablePhysicalAddressArrayColumnBase, manyTypes.FindProperty("NullablePhysicalAddressArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullablePhysicalAddressNestedCollectionColumnBase, manyTypes.FindProperty("NullablePhysicalAddressNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableStringColumnBase, manyTypes.FindProperty("NullableString")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableStringArrayColumnBase, manyTypes.FindProperty("NullableStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableStringNestedCollectionColumnBase, manyTypes.FindProperty("NullableStringNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableTimeOnlyColumnBase, manyTypes.FindProperty("NullableTimeOnly")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableTimeOnlyArrayColumnBase, manyTypes.FindProperty("NullableTimeOnlyArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableTimeSpanColumnBase, manyTypes.FindProperty("NullableTimeSpan")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -975,6 +1038,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)nullableUInt64ArrayColumnBase, manyTypes.FindProperty("NullableUInt64Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableUInt8ColumnBase, manyTypes.FindProperty("NullableUInt8")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableUInt8ArrayColumnBase, manyTypes.FindProperty("NullableUInt8Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableUInt8NestedCollectionColumnBase, manyTypes.FindProperty("NullableUInt8NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableUriColumnBase, manyTypes.FindProperty("NullableUri")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableUriArrayColumnBase, manyTypes.FindProperty("NullableUriArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)physicalAddressColumnBase, manyTypes.FindProperty("PhysicalAddress")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -983,6 +1047,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)physicalAddressToStringConverterPropertyColumnBase, manyTypes.FindProperty("PhysicalAddressToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)stringColumnBase, manyTypes.FindProperty("String")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)stringArrayColumnBase, manyTypes.FindProperty("StringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)stringNestedCollectionColumnBase, manyTypes.FindProperty("StringNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)stringToBoolConverterPropertyColumnBase, manyTypes.FindProperty("StringToBoolConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)stringToBytesConverterPropertyColumnBase, manyTypes.FindProperty("StringToBytesConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)stringToCharConverterPropertyColumnBase, manyTypes.FindProperty("StringToCharConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -1013,6 +1078,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)uInt64ArrayColumnBase, manyTypes.FindProperty("UInt64Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)uInt8ColumnBase, manyTypes.FindProperty("UInt8")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)uInt8ArrayColumnBase, manyTypes.FindProperty("UInt8Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)uInt8NestedCollectionColumnBase, manyTypes.FindProperty("UInt8NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)uriColumnBase, manyTypes.FindProperty("Uri")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)uriArrayColumnBase, manyTypes.FindProperty("UriArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)uriToStringConverterPropertyColumnBase, manyTypes.FindProperty("UriToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -1026,6 +1092,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Bool", boolColumn); var boolArrayColumn = new Column("BoolArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("BoolArray", boolArrayColumn); + var boolNestedCollectionColumn = new Column("BoolNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("BoolNestedCollection", boolNestedCollectionColumn); var boolToStringConverterPropertyColumn = new Column("BoolToStringConverterProperty", "nvarchar(1)", manyTypesTable); manyTypesTable.Columns.Add("BoolToStringConverterProperty", boolToStringConverterPropertyColumn); var boolToTwoValuesConverterPropertyColumn = new Column("BoolToTwoValuesConverterProperty", "tinyint", manyTypesTable); @@ -1036,6 +1104,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Bytes", bytesColumn); var bytesArrayColumn = new Column("BytesArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("BytesArray", bytesArrayColumn); + var bytesNestedCollectionColumn = new Column("BytesNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("BytesNestedCollection", bytesNestedCollectionColumn); var bytesToStringConverterPropertyColumn = new Column("BytesToStringConverterProperty", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("BytesToStringConverterProperty", bytesToStringConverterPropertyColumn); var castingConverterPropertyColumn = new Column("CastingConverterProperty", "decimal(18,2)", manyTypesTable); @@ -1044,6 +1114,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Char", charColumn); var charArrayColumn = new Column("CharArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("CharArray", charArrayColumn); + var charNestedCollectionColumn = new Column("CharNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("CharNestedCollection", charNestedCollectionColumn); var charToStringConverterPropertyColumn = new Column("CharToStringConverterProperty", "nchar(1)", manyTypesTable); manyTypesTable.Columns.Add("CharToStringConverterProperty", charToStringConverterPropertyColumn); var dateOnlyColumn = new Column("DateOnly", "date", manyTypesTable); @@ -1108,6 +1180,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Enum32AsStringCollection", enum32AsStringCollectionColumn); var enum32CollectionColumn = new Column("Enum32Collection", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("Enum32Collection", enum32CollectionColumn); + var enum32NestedCollectionColumn = new Column("Enum32NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("Enum32NestedCollection", enum32NestedCollectionColumn); var enum64Column = new Column("Enum64", "bigint", manyTypesTable); manyTypesTable.Columns.Add("Enum64", enum64Column); var enum64ArrayColumn = new Column("Enum64Array", "nvarchar(max)", manyTypesTable); @@ -1132,6 +1206,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Enum8AsStringCollection", enum8AsStringCollectionColumn); var enum8CollectionColumn = new Column("Enum8Collection", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("Enum8Collection", enum8CollectionColumn); + var enum8NestedCollectionColumn = new Column("Enum8NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("Enum8NestedCollection", enum8NestedCollectionColumn); var enumToNumberConverterPropertyColumn = new Column("EnumToNumberConverterProperty", "int", manyTypesTable); manyTypesTable.Columns.Add("EnumToNumberConverterProperty", enumToNumberConverterPropertyColumn); var enumToStringConverterPropertyColumn = new Column("EnumToStringConverterProperty", "nvarchar(max)", manyTypesTable); @@ -1172,6 +1248,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("EnumU64AsStringCollection", enumU64AsStringCollectionColumn); var enumU64CollectionColumn = new Column("EnumU64Collection", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("EnumU64Collection", enumU64CollectionColumn); + var enumU64NestedCollectionColumn = new Column("EnumU64NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("EnumU64NestedCollection", enumU64NestedCollectionColumn); var enumU8Column = new Column("EnumU8", "tinyint", manyTypesTable); manyTypesTable.Columns.Add("EnumU8", enumU8Column); var enumU8ArrayColumn = new Column("EnumU8Array", "nvarchar(max)", manyTypesTable); @@ -1192,6 +1270,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Guid", guidColumn); var guidArrayColumn = new Column("GuidArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("GuidArray", guidArrayColumn); + var guidNestedCollectionColumn = new Column("GuidNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("GuidNestedCollection", guidNestedCollectionColumn); var guidToBytesConverterPropertyColumn = new Column("GuidToBytesConverterProperty", "varbinary(16)", manyTypesTable); manyTypesTable.Columns.Add("GuidToBytesConverterProperty", guidToBytesConverterPropertyColumn); var guidToStringConverterPropertyColumn = new Column("GuidToStringConverterProperty", "nvarchar(36)", manyTypesTable); @@ -1212,14 +1292,20 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Int32", int32Column); var int32ArrayColumn = new Column("Int32Array", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("Int32Array", int32ArrayColumn); + var int32NestedCollectionColumn = new Column("Int32NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("Int32NestedCollection", int32NestedCollectionColumn); var int64Column = new Column("Int64", "bigint", manyTypesTable); manyTypesTable.Columns.Add("Int64", int64Column); var int64ArrayColumn = new Column("Int64Array", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("Int64Array", int64ArrayColumn); + var int64NestedCollectionColumn = new Column("Int64NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("Int64NestedCollection", int64NestedCollectionColumn); var int8Column = new Column("Int8", "smallint", manyTypesTable); manyTypesTable.Columns.Add("Int8", int8Column); var int8ArrayColumn = new Column("Int8Array", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("Int8Array", int8ArrayColumn); + var int8NestedCollectionColumn = new Column("Int8NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("Int8NestedCollection", int8NestedCollectionColumn); var intNumberToBytesConverterPropertyColumn = new Column("IntNumberToBytesConverterProperty", "varbinary(4)", manyTypesTable); manyTypesTable.Columns.Add("IntNumberToBytesConverterProperty", intNumberToBytesConverterPropertyColumn); var intNumberToStringConverterPropertyColumn = new Column("IntNumberToStringConverterProperty", "nvarchar(64)", manyTypesTable); @@ -1243,6 +1329,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableBytes", nullableBytesColumn); var nullableBytesArrayColumn = new Column("NullableBytesArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableBytesArray", nullableBytesArrayColumn); + var nullableBytesNestedCollectionColumn = new Column("NullableBytesNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableBytesNestedCollection", nullableBytesNestedCollectionColumn); var nullableCharColumn = new Column("NullableChar", "nvarchar(1)", manyTypesTable) { IsNullable = true @@ -1314,6 +1402,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableEnum32AsStringCollection", nullableEnum32AsStringCollectionColumn); var nullableEnum32CollectionColumn = new Column("NullableEnum32Collection", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableEnum32Collection", nullableEnum32CollectionColumn); + var nullableEnum32NestedCollectionColumn = new Column("NullableEnum32NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableEnum32NestedCollection", nullableEnum32NestedCollectionColumn); var nullableEnum64Column = new Column("NullableEnum64", "bigint", manyTypesTable) { IsNullable = true @@ -1350,6 +1440,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableEnum8AsStringCollection", nullableEnum8AsStringCollectionColumn); var nullableEnum8CollectionColumn = new Column("NullableEnum8Collection", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableEnum8Collection", nullableEnum8CollectionColumn); + var nullableEnum8NestedCollectionColumn = new Column("NullableEnum8NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableEnum8NestedCollection", nullableEnum8NestedCollectionColumn); var nullableEnumU16Column = new Column("NullableEnumU16", "int", manyTypesTable) { IsNullable = true @@ -1404,6 +1496,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableEnumU64AsStringCollection", nullableEnumU64AsStringCollectionColumn); var nullableEnumU64CollectionColumn = new Column("NullableEnumU64Collection", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableEnumU64Collection", nullableEnumU64CollectionColumn); + var nullableEnumU64NestedCollectionColumn = new Column("NullableEnumU64NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableEnumU64NestedCollection", nullableEnumU64NestedCollectionColumn); var nullableEnumU8Column = new Column("NullableEnumU8", "tinyint", manyTypesTable) { IsNullable = true @@ -1436,6 +1530,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableGuid", nullableGuidColumn); var nullableGuidArrayColumn = new Column("NullableGuidArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableGuidArray", nullableGuidArrayColumn); + var nullableGuidNestedCollectionColumn = new Column("NullableGuidNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableGuidNestedCollection", nullableGuidNestedCollectionColumn); var nullableIPAddressColumn = new Column("NullableIPAddress", "nvarchar(45)", manyTypesTable) { IsNullable = true @@ -1457,6 +1553,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableInt32", nullableInt32Column); var nullableInt32ArrayColumn = new Column("NullableInt32Array", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableInt32Array", nullableInt32ArrayColumn); + var nullableInt32NestedCollectionColumn = new Column("NullableInt32NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableInt32NestedCollection", nullableInt32NestedCollectionColumn); var nullableInt64Column = new Column("NullableInt64", "bigint", manyTypesTable) { IsNullable = true @@ -1464,6 +1562,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableInt64", nullableInt64Column); var nullableInt64ArrayColumn = new Column("NullableInt64Array", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableInt64Array", nullableInt64ArrayColumn); + var nullableInt64NestedCollectionColumn = new Column("NullableInt64NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableInt64NestedCollection", nullableInt64NestedCollectionColumn); var nullableInt8Column = new Column("NullableInt8", "smallint", manyTypesTable) { IsNullable = true @@ -1478,6 +1578,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullablePhysicalAddress", nullablePhysicalAddressColumn); var nullablePhysicalAddressArrayColumn = new Column("NullablePhysicalAddressArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullablePhysicalAddressArray", nullablePhysicalAddressArrayColumn); + var nullablePhysicalAddressNestedCollectionColumn = new Column("NullablePhysicalAddressNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullablePhysicalAddressNestedCollection", nullablePhysicalAddressNestedCollectionColumn); var nullableStringColumn = new Column("NullableString", "nvarchar(max)", manyTypesTable) { IsNullable = true @@ -1485,6 +1587,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableString", nullableStringColumn); var nullableStringArrayColumn = new Column("NullableStringArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableStringArray", nullableStringArrayColumn); + var nullableStringNestedCollectionColumn = new Column("NullableStringNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableStringNestedCollection", nullableStringNestedCollectionColumn); var nullableTimeOnlyColumn = new Column("NullableTimeOnly", "time", manyTypesTable) { IsNullable = true @@ -1527,6 +1631,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableUInt8", nullableUInt8Column); var nullableUInt8ArrayColumn = new Column("NullableUInt8Array", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableUInt8Array", nullableUInt8ArrayColumn); + var nullableUInt8NestedCollectionColumn = new Column("NullableUInt8NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableUInt8NestedCollection", nullableUInt8NestedCollectionColumn); var nullableUriColumn = new Column("NullableUri", "nvarchar(max)", manyTypesTable) { IsNullable = true @@ -1546,6 +1652,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("String", stringColumn); var stringArrayColumn = new Column("StringArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("StringArray", stringArrayColumn); + var stringNestedCollectionColumn = new Column("StringNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("StringNestedCollection", stringNestedCollectionColumn); var stringToBoolConverterPropertyColumn = new Column("StringToBoolConverterProperty", "bit", manyTypesTable); manyTypesTable.Columns.Add("StringToBoolConverterProperty", stringToBoolConverterPropertyColumn); var stringToBytesConverterPropertyColumn = new Column("StringToBytesConverterProperty", "varbinary(max)", manyTypesTable) @@ -1609,6 +1717,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("UInt8", uInt8Column); var uInt8ArrayColumn = new Column("UInt8Array", "varbinary(max)", manyTypesTable); manyTypesTable.Columns.Add("UInt8Array", uInt8ArrayColumn); + var uInt8NestedCollectionColumn = new Column("UInt8NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("UInt8NestedCollection", uInt8NestedCollectionColumn); var uriColumn = new Column("Uri", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("Uri", uriColumn); var uriArrayColumn = new Column("UriArray", "nvarchar(max)", manyTypesTable); @@ -1630,15 +1740,18 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(idColumn0, manyTypes.FindProperty("Id")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(boolColumn, manyTypes.FindProperty("Bool")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(boolArrayColumn, manyTypes.FindProperty("BoolArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(boolNestedCollectionColumn, manyTypes.FindProperty("BoolNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(boolToStringConverterPropertyColumn, manyTypes.FindProperty("BoolToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(boolToTwoValuesConverterPropertyColumn, manyTypes.FindProperty("BoolToTwoValuesConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(boolToZeroOneConverterPropertyColumn, manyTypes.FindProperty("BoolToZeroOneConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(bytesColumn, manyTypes.FindProperty("Bytes")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(bytesArrayColumn, manyTypes.FindProperty("BytesArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(bytesNestedCollectionColumn, manyTypes.FindProperty("BytesNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(bytesToStringConverterPropertyColumn, manyTypes.FindProperty("BytesToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(castingConverterPropertyColumn, manyTypes.FindProperty("CastingConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(charColumn, manyTypes.FindProperty("Char")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(charArrayColumn, manyTypes.FindProperty("CharArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(charNestedCollectionColumn, manyTypes.FindProperty("CharNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(charToStringConverterPropertyColumn, manyTypes.FindProperty("CharToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(dateOnlyColumn, manyTypes.FindProperty("DateOnly")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(dateOnlyArrayColumn, manyTypes.FindProperty("DateOnlyArray")!, manyTypesTableMapping); @@ -1671,6 +1784,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(enum32AsStringArrayColumn, manyTypes.FindProperty("Enum32AsStringArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum32AsStringCollectionColumn, manyTypes.FindProperty("Enum32AsStringCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum32CollectionColumn, manyTypes.FindProperty("Enum32Collection")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(enum32NestedCollectionColumn, manyTypes.FindProperty("Enum32NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum64Column, manyTypes.FindProperty("Enum64")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum64ArrayColumn, manyTypes.FindProperty("Enum64Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum64AsStringColumn, manyTypes.FindProperty("Enum64AsString")!, manyTypesTableMapping); @@ -1683,6 +1797,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(enum8AsStringArrayColumn, manyTypes.FindProperty("Enum8AsStringArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum8AsStringCollectionColumn, manyTypes.FindProperty("Enum8AsStringCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum8CollectionColumn, manyTypes.FindProperty("Enum8Collection")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(enum8NestedCollectionColumn, manyTypes.FindProperty("Enum8NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumToNumberConverterPropertyColumn, manyTypes.FindProperty("EnumToNumberConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumToStringConverterPropertyColumn, manyTypes.FindProperty("EnumToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumU16Column, manyTypes.FindProperty("EnumU16")!, manyTypesTableMapping); @@ -1703,6 +1818,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(enumU64AsStringArrayColumn, manyTypes.FindProperty("EnumU64AsStringArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumU64AsStringCollectionColumn, manyTypes.FindProperty("EnumU64AsStringCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumU64CollectionColumn, manyTypes.FindProperty("EnumU64Collection")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(enumU64NestedCollectionColumn, manyTypes.FindProperty("EnumU64NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumU8Column, manyTypes.FindProperty("EnumU8")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumU8ArrayColumn, manyTypes.FindProperty("EnumU8Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumU8AsStringColumn, manyTypes.FindProperty("EnumU8AsString")!, manyTypesTableMapping); @@ -1713,6 +1829,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(floatArrayColumn, manyTypes.FindProperty("FloatArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(guidColumn, manyTypes.FindProperty("Guid")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(guidArrayColumn, manyTypes.FindProperty("GuidArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(guidNestedCollectionColumn, manyTypes.FindProperty("GuidNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(guidToBytesConverterPropertyColumn, manyTypes.FindProperty("GuidToBytesConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(guidToStringConverterPropertyColumn, manyTypes.FindProperty("GuidToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(iPAddressColumn, manyTypes.FindProperty("IPAddress")!, manyTypesTableMapping); @@ -1723,10 +1840,13 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(int16ArrayColumn, manyTypes.FindProperty("Int16Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(int32Column, manyTypes.FindProperty("Int32")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(int32ArrayColumn, manyTypes.FindProperty("Int32Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(int32NestedCollectionColumn, manyTypes.FindProperty("Int32NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(int64Column, manyTypes.FindProperty("Int64")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(int64ArrayColumn, manyTypes.FindProperty("Int64Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(int64NestedCollectionColumn, manyTypes.FindProperty("Int64NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(int8Column, manyTypes.FindProperty("Int8")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(int8ArrayColumn, manyTypes.FindProperty("Int8Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(int8NestedCollectionColumn, manyTypes.FindProperty("Int8NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(intNumberToBytesConverterPropertyColumn, manyTypes.FindProperty("IntNumberToBytesConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(intNumberToStringConverterPropertyColumn, manyTypes.FindProperty("IntNumberToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullIntToNullStringConverterPropertyColumn, manyTypes.FindProperty("NullIntToNullStringConverterProperty")!, manyTypesTableMapping); @@ -1734,6 +1854,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(nullableBoolArrayColumn, manyTypes.FindProperty("NullableBoolArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableBytesColumn, manyTypes.FindProperty("NullableBytes")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableBytesArrayColumn, manyTypes.FindProperty("NullableBytesArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableBytesNestedCollectionColumn, manyTypes.FindProperty("NullableBytesNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableCharColumn, manyTypes.FindProperty("NullableChar")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableCharArrayColumn, manyTypes.FindProperty("NullableCharArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableDateOnlyColumn, manyTypes.FindProperty("NullableDateOnly")!, manyTypesTableMapping); @@ -1756,6 +1877,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(nullableEnum32AsStringArrayColumn, manyTypes.FindProperty("NullableEnum32AsStringArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum32AsStringCollectionColumn, manyTypes.FindProperty("NullableEnum32AsStringCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum32CollectionColumn, manyTypes.FindProperty("NullableEnum32Collection")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableEnum32NestedCollectionColumn, manyTypes.FindProperty("NullableEnum32NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum64Column, manyTypes.FindProperty("NullableEnum64")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum64ArrayColumn, manyTypes.FindProperty("NullableEnum64Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum64AsStringColumn, manyTypes.FindProperty("NullableEnum64AsString")!, manyTypesTableMapping); @@ -1768,6 +1890,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(nullableEnum8AsStringArrayColumn, manyTypes.FindProperty("NullableEnum8AsStringArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum8AsStringCollectionColumn, manyTypes.FindProperty("NullableEnum8AsStringCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum8CollectionColumn, manyTypes.FindProperty("NullableEnum8Collection")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableEnum8NestedCollectionColumn, manyTypes.FindProperty("NullableEnum8NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU16Column, manyTypes.FindProperty("NullableEnumU16")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU16ArrayColumn, manyTypes.FindProperty("NullableEnumU16Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU16AsStringColumn, manyTypes.FindProperty("NullableEnumU16AsString")!, manyTypesTableMapping); @@ -1786,6 +1909,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(nullableEnumU64AsStringArrayColumn, manyTypes.FindProperty("NullableEnumU64AsStringArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU64AsStringCollectionColumn, manyTypes.FindProperty("NullableEnumU64AsStringCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU64CollectionColumn, manyTypes.FindProperty("NullableEnumU64Collection")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableEnumU64NestedCollectionColumn, manyTypes.FindProperty("NullableEnumU64NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU8Column, manyTypes.FindProperty("NullableEnumU8")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU8ArrayColumn, manyTypes.FindProperty("NullableEnumU8Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU8AsStringColumn, manyTypes.FindProperty("NullableEnumU8AsString")!, manyTypesTableMapping); @@ -1796,20 +1920,25 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(nullableFloatArrayColumn, manyTypes.FindProperty("NullableFloatArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableGuidColumn, manyTypes.FindProperty("NullableGuid")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableGuidArrayColumn, manyTypes.FindProperty("NullableGuidArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableGuidNestedCollectionColumn, manyTypes.FindProperty("NullableGuidNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableIPAddressColumn, manyTypes.FindProperty("NullableIPAddress")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableIPAddressArrayColumn, manyTypes.FindProperty("NullableIPAddressArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt16Column, manyTypes.FindProperty("NullableInt16")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt16ArrayColumn, manyTypes.FindProperty("NullableInt16Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt32Column, manyTypes.FindProperty("NullableInt32")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt32ArrayColumn, manyTypes.FindProperty("NullableInt32Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableInt32NestedCollectionColumn, manyTypes.FindProperty("NullableInt32NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt64Column, manyTypes.FindProperty("NullableInt64")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt64ArrayColumn, manyTypes.FindProperty("NullableInt64Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableInt64NestedCollectionColumn, manyTypes.FindProperty("NullableInt64NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt8Column, manyTypes.FindProperty("NullableInt8")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt8ArrayColumn, manyTypes.FindProperty("NullableInt8Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullablePhysicalAddressColumn, manyTypes.FindProperty("NullablePhysicalAddress")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullablePhysicalAddressArrayColumn, manyTypes.FindProperty("NullablePhysicalAddressArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullablePhysicalAddressNestedCollectionColumn, manyTypes.FindProperty("NullablePhysicalAddressNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableStringColumn, manyTypes.FindProperty("NullableString")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableStringArrayColumn, manyTypes.FindProperty("NullableStringArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableStringNestedCollectionColumn, manyTypes.FindProperty("NullableStringNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableTimeOnlyColumn, manyTypes.FindProperty("NullableTimeOnly")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableTimeOnlyArrayColumn, manyTypes.FindProperty("NullableTimeOnlyArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableTimeSpanColumn, manyTypes.FindProperty("NullableTimeSpan")!, manyTypesTableMapping); @@ -1822,6 +1951,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(nullableUInt64ArrayColumn, manyTypes.FindProperty("NullableUInt64Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableUInt8Column, manyTypes.FindProperty("NullableUInt8")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableUInt8ArrayColumn, manyTypes.FindProperty("NullableUInt8Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableUInt8NestedCollectionColumn, manyTypes.FindProperty("NullableUInt8NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableUriColumn, manyTypes.FindProperty("NullableUri")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableUriArrayColumn, manyTypes.FindProperty("NullableUriArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(physicalAddressColumn, manyTypes.FindProperty("PhysicalAddress")!, manyTypesTableMapping); @@ -1830,6 +1960,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(physicalAddressToStringConverterPropertyColumn, manyTypes.FindProperty("PhysicalAddressToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(stringColumn, manyTypes.FindProperty("String")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(stringArrayColumn, manyTypes.FindProperty("StringArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(stringNestedCollectionColumn, manyTypes.FindProperty("StringNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(stringToBoolConverterPropertyColumn, manyTypes.FindProperty("StringToBoolConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(stringToBytesConverterPropertyColumn, manyTypes.FindProperty("StringToBytesConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(stringToCharConverterPropertyColumn, manyTypes.FindProperty("StringToCharConverterProperty")!, manyTypesTableMapping); @@ -1860,6 +1991,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(uInt64ArrayColumn, manyTypes.FindProperty("UInt64Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(uInt8Column, manyTypes.FindProperty("UInt8")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(uInt8ArrayColumn, manyTypes.FindProperty("UInt8Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(uInt8NestedCollectionColumn, manyTypes.FindProperty("UInt8NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(uriColumn, manyTypes.FindProperty("Uri")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(uriArrayColumn, manyTypes.FindProperty("UriArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(uriToStringConverterPropertyColumn, manyTypes.FindProperty("UriToStringConverterProperty")!, manyTypesTableMapping); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs index ee30773de2f..3eef4065e9e 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/ManyTypesEntityType.cs @@ -33,7 +33,7 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+ManyTypes", typeof(CompiledModelTestBase.ManyTypes), baseEntityType, - propertyCount: 236, + propertyCount: 258, keyCount: 1); var id = runtimeEntityType.AddProperty( @@ -159,11 +159,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); boolArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (bool v1, bool v2) => v1 == v2, (bool v) => v.GetHashCode(), (bool v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (bool v1, bool v2) => v1 == v2, (bool v) => v.GetHashCode(), (bool v) => v)), @@ -175,10 +175,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonBoolReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonBoolReaderWriter.Instance), elementMapping: SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -195,6 +195,93 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (bool v) => v))); boolArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var boolNestedCollection = runtimeEntityType.AddProperty( + "BoolNestedCollection", + typeof(bool[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + boolNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadBoolNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadBoolNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadBoolNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadBoolNestedCollection(instance) == null); + boolNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => WriteBoolNestedCollection(entity, value)); + boolNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => WriteBoolNestedCollection(entity, value)); + boolNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadBoolNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadBoolNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(boolNestedCollection, 3), + (InternalEntityEntry entry) => entry.GetCurrentValue(boolNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[3]); + boolNestedCollection.SetPropertyIndexes( + index: 3, + originalValueIndex: 3, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + boolNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonBoolReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonBoolReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + JsonBoolReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonBoolReaderWriter.Instance), + elementMapping: SqlServerBoolTypeMapping.Default.Clone( + comparer: new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v), + keyComparer: new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v), + providerValueComparer: new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v)))); + boolNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var boolToStringConverterProperty = runtimeEntityType.AddProperty( "BoolToStringConverterProperty", typeof(bool), @@ -212,12 +299,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas boolToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadBoolToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadBoolToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToStringConverterProperty, 3), + (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToStringConverterProperty, 4), (InternalEntityEntry entry) => entry.GetCurrentValue(boolToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[3]); + (ValueBuffer valueBuffer) => valueBuffer[4]); boolToStringConverterProperty.SetPropertyIndexes( - index: 3, - originalValueIndex: 3, + index: 4, + originalValueIndex: 4, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -267,12 +354,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas boolToTwoValuesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadBoolToTwoValuesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadBoolToTwoValuesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToTwoValuesConverterProperty, 4), + (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToTwoValuesConverterProperty, 5), (InternalEntityEntry entry) => entry.GetCurrentValue(boolToTwoValuesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[4]); + (ValueBuffer valueBuffer) => valueBuffer[5]); boolToTwoValuesConverterProperty.SetPropertyIndexes( - index: 4, - originalValueIndex: 4, + index: 5, + originalValueIndex: 5, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -318,12 +405,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas boolToZeroOneConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadBoolToZeroOneConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadBoolToZeroOneConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToZeroOneConverterProperty, 5), + (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToZeroOneConverterProperty, 6), (InternalEntityEntry entry) => entry.GetCurrentValue(boolToZeroOneConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[5]); + (ValueBuffer valueBuffer) => valueBuffer[6]); boolToZeroOneConverterProperty.SetPropertyIndexes( - index: 5, - originalValueIndex: 5, + index: 6, + originalValueIndex: 6, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -368,12 +455,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas bytes.SetAccessors( (InternalEntityEntry entry) => ReadBytes((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadBytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(bytes, 6), + (InternalEntityEntry entry) => entry.ReadOriginalValue(bytes, 7), (InternalEntityEntry entry) => entry.GetCurrentValue(bytes), - (ValueBuffer valueBuffer) => valueBuffer[6]); + (ValueBuffer valueBuffer) => valueBuffer[7]); bytes.SetPropertyIndexes( - index: 6, - originalValueIndex: 6, + index: 7, + originalValueIndex: 7, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -412,21 +499,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas bytesArray.SetAccessors( (InternalEntityEntry entry) => ReadBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesArray, 7), + (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesArray, 8), (InternalEntityEntry entry) => entry.GetCurrentValue(bytesArray), - (ValueBuffer valueBuffer) => valueBuffer[7]); + (ValueBuffer valueBuffer) => valueBuffer[8]); bytesArray.SetPropertyIndexes( - index: 7, - originalValueIndex: 7, + index: 8, + originalValueIndex: 8, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); bytesArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), (byte[] v) => v.GetHashCode(), (byte[] v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), (byte[] v) => v.GetHashCode(), (byte[] v) => v)), @@ -438,10 +525,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( JsonByteArrayReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -461,6 +548,96 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypePostfix: StoreTypePostfix.None)); bytesArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var bytesNestedCollection = runtimeEntityType.AddProperty( + "BytesNestedCollection", + typeof(byte[][][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BytesNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + bytesNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadBytesNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadBytesNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadBytesNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadBytesNestedCollection(instance) == null); + bytesNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => WriteBytesNestedCollection(entity, value)); + bytesNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => WriteBytesNestedCollection(entity, value)); + bytesNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesNestedCollection, 9), + (InternalEntityEntry entry) => entry.GetCurrentValue(bytesNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[9]); + bytesNestedCollection.SetPropertyIndexes( + index: 9, + originalValueIndex: 9, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + bytesNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v)), + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance), + elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( + comparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v), + keyComparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), + (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), + (byte[] source) => source.ToArray()), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "varbinary(max)"), + storeTypePostfix: StoreTypePostfix.None))); + bytesNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var bytesToStringConverterProperty = runtimeEntityType.AddProperty( "BytesToStringConverterProperty", typeof(byte[]), @@ -480,12 +657,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas bytesToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadBytesToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadBytesToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesToStringConverterProperty, 8), + (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesToStringConverterProperty, 10), (InternalEntityEntry entry) => entry.GetCurrentValue(bytesToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[8]); + (ValueBuffer valueBuffer) => valueBuffer[10]); bytesToStringConverterProperty.SetPropertyIndexes( - index: 8, - originalValueIndex: 8, + index: 10, + originalValueIndex: 10, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -535,12 +712,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas castingConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadCastingConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadCastingConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(castingConverterProperty, 9), + (InternalEntityEntry entry) => entry.ReadOriginalValue(castingConverterProperty, 11), (InternalEntityEntry entry) => entry.GetCurrentValue(castingConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[9]); + (ValueBuffer valueBuffer) => valueBuffer[11]); castingConverterProperty.SetPropertyIndexes( - index: 9, - originalValueIndex: 9, + index: 11, + originalValueIndex: 11, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -585,12 +762,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas @char.SetAccessors( (InternalEntityEntry entry) => ReadChar((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadChar((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(@char, 10), + (InternalEntityEntry entry) => entry.ReadOriginalValue(@char, 12), (InternalEntityEntry entry) => entry.GetCurrentValue(@char), - (ValueBuffer valueBuffer) => valueBuffer[10]); + (ValueBuffer valueBuffer) => valueBuffer[12]); @char.SetPropertyIndexes( - index: 10, - originalValueIndex: 10, + index: 12, + originalValueIndex: 12, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -640,21 +817,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas charArray.SetAccessors( (InternalEntityEntry entry) => ReadCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(charArray, 11), + (InternalEntityEntry entry) => entry.ReadOriginalValue(charArray, 13), (InternalEntityEntry entry) => entry.GetCurrentValue(charArray), - (ValueBuffer valueBuffer) => valueBuffer[11]); + (ValueBuffer valueBuffer) => valueBuffer[13]); charArray.SetPropertyIndexes( - index: 11, - originalValueIndex: 11, + index: 13, + originalValueIndex: 13, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); charArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (char v1, char v2) => v1 == v2, (char v) => (int)v, (char v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (char v1, char v2) => v1 == v2, (char v) => (int)v, (char v) => v)), @@ -666,14 +843,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), (string v) => v.Length < 1 ? '\0' : v[0])))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -707,6 +884,122 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (string v) => v.Length < 1 ? '\0' : v[0])))); charArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var charNestedCollection = runtimeEntityType.AddProperty( + "CharNestedCollection", + typeof(char[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CharNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + charNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadCharNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadCharNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadCharNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadCharNestedCollection(instance) == null); + charNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, char[][] value) => WriteCharNestedCollection(entity, value)); + charNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, char[][] value) => WriteCharNestedCollection(entity, value)); + charNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadCharNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadCharNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(charNestedCollection, 14), + (InternalEntityEntry entry) => entry.GetCurrentValue(charNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[14]); + charNestedCollection.SetPropertyIndexes( + index: 14, + originalValueIndex: 14, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + charNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (char v1, char v2) => v1 == v2, + (char v) => (int)v, + (char v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (char v1, char v2) => v1 == v2, + (char v) => (int)v, + (char v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), + (string v) => v.Length < 1 ? '\0' : v[0]))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), + (string v) => v.Length < 1 ? '\0' : v[0])))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (char v1, char v2) => v1 == v2, + (char v) => (int)v, + (char v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (char v1, char v2) => v1 == v2, + (char v) => (int)v, + (char v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), + (string v) => v.Length < 1 ? '\0' : v[0])))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), + (string v) => v.Length < 1 ? '\0' : v[0]))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ValueComparer( + (char v1, char v2) => v1 == v2, + (char v) => (int)v, + (char v) => v), + keyComparer: new ValueComparer( + (char v1, char v2) => v1 == v2, + (char v) => (int)v, + (char v) => v), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(1)", + size: 1, + unicode: true, + dbType: System.Data.DbType.String), + converter: new ValueConverter( + (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), + (string v) => v.Length < 1 ? '\0' : v[0]), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), + (string v) => v.Length < 1 ? '\0' : v[0]))))); + charNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var charToStringConverterProperty = runtimeEntityType.AddProperty( "CharToStringConverterProperty", typeof(char), @@ -725,12 +1018,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas charToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadCharToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadCharToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(charToStringConverterProperty, 12), + (InternalEntityEntry entry) => entry.ReadOriginalValue(charToStringConverterProperty, 15), (InternalEntityEntry entry) => entry.GetCurrentValue(charToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[12]); + (ValueBuffer valueBuffer) => valueBuffer[15]); charToStringConverterProperty.SetPropertyIndexes( - index: 12, - originalValueIndex: 12, + index: 15, + originalValueIndex: 15, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -783,12 +1076,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateOnly.SetAccessors( (InternalEntityEntry entry) => ReadDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnly, 13), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnly, 16), (InternalEntityEntry entry) => entry.GetCurrentValue(dateOnly), - (ValueBuffer valueBuffer) => valueBuffer[13]); + (ValueBuffer valueBuffer) => valueBuffer[16]); dateOnly.SetPropertyIndexes( - index: 13, - originalValueIndex: 13, + index: 16, + originalValueIndex: 16, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -824,21 +1117,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateOnlyArray.SetAccessors( (InternalEntityEntry entry) => ReadDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnlyArray, 14), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnlyArray, 17), (InternalEntityEntry entry) => entry.GetCurrentValue(dateOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[14]); + (ValueBuffer valueBuffer) => valueBuffer[17]); dateOnlyArray.SetPropertyIndexes( - index: 14, - originalValueIndex: 14, + index: 17, + originalValueIndex: 17, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); dateOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (DateOnly v1, DateOnly v2) => v1.Equals(v2), (DateOnly v) => v.GetHashCode(), (DateOnly v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (DateOnly v1, DateOnly v2) => v1.Equals(v2), (DateOnly v) => v.GetHashCode(), (DateOnly v) => v)), @@ -850,10 +1143,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateOnlyReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateOnlyReaderWriter.Instance), elementMapping: SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -888,12 +1181,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateOnlyToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnlyToStringConverterProperty, 15), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnlyToStringConverterProperty, 18), (InternalEntityEntry entry) => entry.GetCurrentValue(dateOnlyToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[15]); + (ValueBuffer valueBuffer) => valueBuffer[18]); dateOnlyToStringConverterProperty.SetPropertyIndexes( - index: 15, - originalValueIndex: 15, + index: 18, + originalValueIndex: 18, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -944,12 +1237,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTime.SetAccessors( (InternalEntityEntry entry) => ReadDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTime, 16), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTime, 19), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTime), - (ValueBuffer valueBuffer) => valueBuffer[16]); + (ValueBuffer valueBuffer) => valueBuffer[19]); dateTime.SetPropertyIndexes( - index: 16, - originalValueIndex: 16, + index: 19, + originalValueIndex: 19, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -985,21 +1278,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeArray.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeArray, 17), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeArray, 20), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeArray), - (ValueBuffer valueBuffer) => valueBuffer[17]); + (ValueBuffer valueBuffer) => valueBuffer[20]); dateTimeArray.SetPropertyIndexes( - index: 17, - originalValueIndex: 17, + index: 20, + originalValueIndex: 20, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); dateTimeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), @@ -1011,10 +1304,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -1049,12 +1342,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeOffsetToBinaryConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeOffsetToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeOffsetToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToBinaryConverterProperty, 18), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToBinaryConverterProperty, 21), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeOffsetToBinaryConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[18]); + (ValueBuffer valueBuffer) => valueBuffer[21]); dateTimeOffsetToBinaryConverterProperty.SetPropertyIndexes( - index: 18, - originalValueIndex: 18, + index: 21, + originalValueIndex: 21, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1100,12 +1393,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeOffsetToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeOffsetToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeOffsetToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToBytesConverterProperty, 19), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToBytesConverterProperty, 22), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeOffsetToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[19]); + (ValueBuffer valueBuffer) => valueBuffer[22]); dateTimeOffsetToBytesConverterProperty.SetPropertyIndexes( - index: 19, - originalValueIndex: 19, + index: 22, + originalValueIndex: 22, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1154,12 +1447,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeOffsetToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeOffsetToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeOffsetToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToStringConverterProperty, 20), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToStringConverterProperty, 23), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeOffsetToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[20]); + (ValueBuffer valueBuffer) => valueBuffer[23]); dateTimeOffsetToStringConverterProperty.SetPropertyIndexes( - index: 20, - originalValueIndex: 20, + index: 23, + originalValueIndex: 23, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1210,12 +1503,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeToBinaryConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToBinaryConverterProperty, 21), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToBinaryConverterProperty, 24), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeToBinaryConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[21]); + (ValueBuffer valueBuffer) => valueBuffer[24]); dateTimeToBinaryConverterProperty.SetPropertyIndexes( - index: 21, - originalValueIndex: 21, + index: 24, + originalValueIndex: 24, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1261,12 +1554,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToStringConverterProperty, 22), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToStringConverterProperty, 25), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[22]); + (ValueBuffer valueBuffer) => valueBuffer[25]); dateTimeToStringConverterProperty.SetPropertyIndexes( - index: 22, - originalValueIndex: 22, + index: 25, + originalValueIndex: 25, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1317,12 +1610,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeToTicksConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToTicksConverterProperty, 23), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToTicksConverterProperty, 26), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[23]); + (ValueBuffer valueBuffer) => valueBuffer[26]); dateTimeToTicksConverterProperty.SetPropertyIndexes( - index: 23, - originalValueIndex: 23, + index: 26, + originalValueIndex: 26, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1359,12 +1652,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas @decimal.SetAccessors( (InternalEntityEntry entry) => ReadDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(@decimal, 24), + (InternalEntityEntry entry) => entry.ReadOriginalValue(@decimal, 27), (InternalEntityEntry entry) => entry.GetCurrentValue(@decimal), - (ValueBuffer valueBuffer) => valueBuffer[24]); + (ValueBuffer valueBuffer) => valueBuffer[27]); @decimal.SetPropertyIndexes( - index: 24, - originalValueIndex: 24, + index: 27, + originalValueIndex: 27, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1400,21 +1693,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas decimalArray.SetAccessors( (InternalEntityEntry entry) => ReadDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalArray, 25), + (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalArray, 28), (InternalEntityEntry entry) => entry.GetCurrentValue(decimalArray), - (ValueBuffer valueBuffer) => valueBuffer[25]); + (ValueBuffer valueBuffer) => valueBuffer[28]); decimalArray.SetPropertyIndexes( - index: 25, - originalValueIndex: 25, + index: 28, + originalValueIndex: 28, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); decimalArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (decimal v1, decimal v2) => v1 == v2, (decimal v) => v.GetHashCode(), (decimal v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (decimal v1, decimal v2) => v1 == v2, (decimal v) => v.GetHashCode(), (decimal v) => v)), @@ -1426,10 +1719,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDecimalReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDecimalReaderWriter.Instance), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -1464,12 +1757,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas decimalNumberToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDecimalNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDecimalNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalNumberToBytesConverterProperty, 26), + (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalNumberToBytesConverterProperty, 29), (InternalEntityEntry entry) => entry.GetCurrentValue(decimalNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[26]); + (ValueBuffer valueBuffer) => valueBuffer[29]); decimalNumberToBytesConverterProperty.SetPropertyIndexes( - index: 26, - originalValueIndex: 26, + index: 29, + originalValueIndex: 29, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1518,12 +1811,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas decimalNumberToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDecimalNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDecimalNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalNumberToStringConverterProperty, 27), + (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalNumberToStringConverterProperty, 30), (InternalEntityEntry entry) => entry.GetCurrentValue(decimalNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[27]); + (ValueBuffer valueBuffer) => valueBuffer[30]); decimalNumberToStringConverterProperty.SetPropertyIndexes( - index: 27, - originalValueIndex: 27, + index: 30, + originalValueIndex: 30, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1574,12 +1867,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas @double.SetAccessors( (InternalEntityEntry entry) => ReadDouble((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDouble((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(@double, 28), + (InternalEntityEntry entry) => entry.ReadOriginalValue(@double, 31), (InternalEntityEntry entry) => entry.GetCurrentValue(@double), - (ValueBuffer valueBuffer) => valueBuffer[28]); + (ValueBuffer valueBuffer) => valueBuffer[31]); @double.SetPropertyIndexes( - index: 28, - originalValueIndex: 28, + index: 31, + originalValueIndex: 31, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1615,21 +1908,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas doubleArray.SetAccessors( (InternalEntityEntry entry) => ReadDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleArray, 29), + (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleArray, 32), (InternalEntityEntry entry) => entry.GetCurrentValue(doubleArray), - (ValueBuffer valueBuffer) => valueBuffer[29]); + (ValueBuffer valueBuffer) => valueBuffer[32]); doubleArray.SetPropertyIndexes( - index: 29, - originalValueIndex: 29, + index: 32, + originalValueIndex: 32, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); doubleArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (double v1, double v2) => v1.Equals(v2), (double v) => v.GetHashCode(), (double v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (double v1, double v2) => v1.Equals(v2), (double v) => v.GetHashCode(), (double v) => v)), @@ -1641,10 +1934,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDoubleReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDoubleReaderWriter.Instance), elementMapping: SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -1679,12 +1972,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas doubleNumberToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDoubleNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDoubleNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleNumberToBytesConverterProperty, 30), + (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleNumberToBytesConverterProperty, 33), (InternalEntityEntry entry) => entry.GetCurrentValue(doubleNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[30]); + (ValueBuffer valueBuffer) => valueBuffer[33]); doubleNumberToBytesConverterProperty.SetPropertyIndexes( - index: 30, - originalValueIndex: 30, + index: 33, + originalValueIndex: 33, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1733,12 +2026,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas doubleNumberToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDoubleNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDoubleNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleNumberToStringConverterProperty, 31), + (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleNumberToStringConverterProperty, 34), (InternalEntityEntry entry) => entry.GetCurrentValue(doubleNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[31]); + (ValueBuffer valueBuffer) => valueBuffer[34]); doubleNumberToStringConverterProperty.SetPropertyIndexes( - index: 31, - originalValueIndex: 31, + index: 34, + originalValueIndex: 34, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1788,12 +2081,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum16.SetAccessors( (InternalEntityEntry entry) => ReadEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16, 32), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16, 35), (InternalEntityEntry entry) => entry.GetCurrentValue(enum16), - (ValueBuffer valueBuffer) => valueBuffer[32]); + (ValueBuffer valueBuffer) => valueBuffer[35]); enum16.SetPropertyIndexes( - index: 32, - originalValueIndex: 32, + index: 35, + originalValueIndex: 35, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1838,21 +2131,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum16Array.SetAccessors( (InternalEntityEntry entry) => ReadEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16Array, 33), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16Array, 36), (InternalEntityEntry entry) => entry.GetCurrentValue(enum16Array), - (ValueBuffer valueBuffer) => valueBuffer[33]); + (ValueBuffer valueBuffer) => valueBuffer[36]); enum16Array.SetPropertyIndexes( - index: 33, - originalValueIndex: 33, + index: 36, + originalValueIndex: 36, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), @@ -1864,14 +2157,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 value) => (short)value, (short value) => (CompiledModelTestBase.Enum16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -1918,12 +2211,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum16AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16AsString, 34), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16AsString, 37), (InternalEntityEntry entry) => entry.GetCurrentValue(enum16AsString), - (ValueBuffer valueBuffer) => valueBuffer[34]); + (ValueBuffer valueBuffer) => valueBuffer[37]); enum16AsString.SetPropertyIndexes( - index: 34, - originalValueIndex: 34, + index: 37, + originalValueIndex: 37, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1973,21 +2266,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum16AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16AsStringArray, 35), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16AsStringArray, 38), (InternalEntityEntry entry) => entry.GetCurrentValue(enum16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[35]); + (ValueBuffer valueBuffer) => valueBuffer[38]); enum16AsStringArray.SetPropertyIndexes( - index: 35, - originalValueIndex: 35, + index: 38, + originalValueIndex: 38, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), @@ -1999,14 +2292,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -2057,21 +2350,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum16AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum16AsStringCollection, 36), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum16AsStringCollection, 39), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[36]); + (ValueBuffer valueBuffer) => valueBuffer[39]); enum16AsStringCollection.SetPropertyIndexes( - index: 36, - originalValueIndex: 36, + index: 39, + originalValueIndex: 39, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), @@ -2083,14 +2376,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -2141,21 +2434,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum16Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum16Collection, 37), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum16Collection, 40), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum16Collection), - (ValueBuffer valueBuffer) => valueBuffer[37]); + (ValueBuffer valueBuffer) => valueBuffer[40]); enum16Collection.SetPropertyIndexes( - index: 37, - originalValueIndex: 37, + index: 40, + originalValueIndex: 40, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), @@ -2167,14 +2460,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 value) => (short)value, (short value) => (CompiledModelTestBase.Enum16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -2220,12 +2513,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum32.SetAccessors( (InternalEntityEntry entry) => ReadEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32, 38), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32, 41), (InternalEntityEntry entry) => entry.GetCurrentValue(enum32), - (ValueBuffer valueBuffer) => valueBuffer[38]); + (ValueBuffer valueBuffer) => valueBuffer[41]); enum32.SetPropertyIndexes( - index: 38, - originalValueIndex: 38, + index: 41, + originalValueIndex: 41, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -2270,21 +2563,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum32Array.SetAccessors( (InternalEntityEntry entry) => ReadEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32Array, 39), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32Array, 42), (InternalEntityEntry entry) => entry.GetCurrentValue(enum32Array), - (ValueBuffer valueBuffer) => valueBuffer[39]); + (ValueBuffer valueBuffer) => valueBuffer[42]); enum32Array.SetPropertyIndexes( - index: 39, - originalValueIndex: 39, + index: 42, + originalValueIndex: 42, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), @@ -2296,14 +2589,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 value) => (int)value, (int value) => (CompiledModelTestBase.Enum32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -2350,12 +2643,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum32AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32AsString, 40), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32AsString, 43), (InternalEntityEntry entry) => entry.GetCurrentValue(enum32AsString), - (ValueBuffer valueBuffer) => valueBuffer[40]); + (ValueBuffer valueBuffer) => valueBuffer[43]); enum32AsString.SetPropertyIndexes( - index: 40, - originalValueIndex: 40, + index: 43, + originalValueIndex: 43, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -2405,21 +2698,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum32AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32AsStringArray, 41), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32AsStringArray, 44), (InternalEntityEntry entry) => entry.GetCurrentValue(enum32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[41]); + (ValueBuffer valueBuffer) => valueBuffer[44]); enum32AsStringArray.SetPropertyIndexes( - index: 41, - originalValueIndex: 41, + index: 44, + originalValueIndex: 44, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), @@ -2431,14 +2724,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -2489,21 +2782,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum32AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum32AsStringCollection, 42), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum32AsStringCollection, 45), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[42]); + (ValueBuffer valueBuffer) => valueBuffer[45]); enum32AsStringCollection.SetPropertyIndexes( - index: 42, - originalValueIndex: 42, + index: 45, + originalValueIndex: 45, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), @@ -2515,14 +2808,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -2573,21 +2866,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum32Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum32Collection, 43), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum32Collection, 46), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum32Collection), - (ValueBuffer valueBuffer) => valueBuffer[43]); + (ValueBuffer valueBuffer) => valueBuffer[46]); enum32Collection.SetPropertyIndexes( - index: 43, - originalValueIndex: 43, + index: 46, + originalValueIndex: 46, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), @@ -2599,14 +2892,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 value) => (int)value, (int value) => (CompiledModelTestBase.Enum32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -2635,6 +2928,151 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (int value) => (CompiledModelTestBase.Enum32)value)))); enum32Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var enum32NestedCollection = runtimeEntityType.AddProperty( + "Enum32NestedCollection", + typeof(List[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum32NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadEnum32NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadEnum32NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadEnum32NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadEnum32NestedCollection(instance) == null); + enum32NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List[][] value) => WriteEnum32NestedCollection(entity, value)); + enum32NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List[][] value) => WriteEnum32NestedCollection(entity, value)); + enum32NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(enum32NestedCollection, 47), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(enum32NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[47]); + enum32NestedCollection.SetPropertyIndexes( + index: 47, + originalValueIndex: 47, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer[][], List[]>(new ListOfReferenceTypesComparer[], List>(new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v)))), + keyComparer: new ListOfReferenceTypesComparer[][], List[]>(new ListOfReferenceTypesComparer[], List>(new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter[]>(new JsonCollectionOfReferencesReaderWriter[][], List[]>( + new JsonCollectionOfReferencesReaderWriter[], List>( + new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter[][], List[]>( + new JsonCollectionOfReferencesReaderWriter[], List>( + new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value))))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer[], List>(new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v))), + keyComparer: new ListOfReferenceTypesComparer[], List>(new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter>(new JsonCollectionOfReferencesReaderWriter[], List>( + new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter[], List>( + new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v)), + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value))), + elementMapping: IntTypeMapping.Default.Clone( + comparer: new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v), + converter: new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))))); + enum32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var enum64 = runtimeEntityType.AddProperty( "Enum64", typeof(CompiledModelTestBase.Enum64), @@ -2652,12 +3090,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum64.SetAccessors( (InternalEntityEntry entry) => ReadEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64, 44), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64, 48), (InternalEntityEntry entry) => entry.GetCurrentValue(enum64), - (ValueBuffer valueBuffer) => valueBuffer[44]); + (ValueBuffer valueBuffer) => valueBuffer[48]); enum64.SetPropertyIndexes( - index: 44, - originalValueIndex: 44, + index: 48, + originalValueIndex: 48, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -2702,21 +3140,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum64Array.SetAccessors( (InternalEntityEntry entry) => ReadEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64Array, 45), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64Array, 49), (InternalEntityEntry entry) => entry.GetCurrentValue(enum64Array), - (ValueBuffer valueBuffer) => valueBuffer[45]); + (ValueBuffer valueBuffer) => valueBuffer[49]); enum64Array.SetPropertyIndexes( - index: 45, - originalValueIndex: 45, + index: 49, + originalValueIndex: 49, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), @@ -2728,14 +3166,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 value) => (long)value, (long value) => (CompiledModelTestBase.Enum64)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -2782,12 +3220,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum64AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64AsString, 46), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64AsString, 50), (InternalEntityEntry entry) => entry.GetCurrentValue(enum64AsString), - (ValueBuffer valueBuffer) => valueBuffer[46]); + (ValueBuffer valueBuffer) => valueBuffer[50]); enum64AsString.SetPropertyIndexes( - index: 46, - originalValueIndex: 46, + index: 50, + originalValueIndex: 50, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -2837,21 +3275,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum64AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64AsStringArray, 47), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64AsStringArray, 51), (InternalEntityEntry entry) => entry.GetCurrentValue(enum64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[47]); + (ValueBuffer valueBuffer) => valueBuffer[51]); enum64AsStringArray.SetPropertyIndexes( - index: 47, - originalValueIndex: 47, + index: 51, + originalValueIndex: 51, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), @@ -2863,14 +3301,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -2921,21 +3359,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum64AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum64AsStringCollection, 48), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum64AsStringCollection, 52), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[48]); + (ValueBuffer valueBuffer) => valueBuffer[52]); enum64AsStringCollection.SetPropertyIndexes( - index: 48, - originalValueIndex: 48, + index: 52, + originalValueIndex: 52, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), @@ -2947,14 +3385,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -3005,21 +3443,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum64Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum64Collection, 49), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum64Collection, 53), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum64Collection), - (ValueBuffer valueBuffer) => valueBuffer[49]); + (ValueBuffer valueBuffer) => valueBuffer[53]); enum64Collection.SetPropertyIndexes( - index: 49, - originalValueIndex: 49, + index: 53, + originalValueIndex: 53, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), @@ -3031,14 +3469,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 value) => (long)value, (long value) => (CompiledModelTestBase.Enum64)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -3084,12 +3522,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum8.SetAccessors( (InternalEntityEntry entry) => ReadEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8, 50), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8, 54), (InternalEntityEntry entry) => entry.GetCurrentValue(enum8), - (ValueBuffer valueBuffer) => valueBuffer[50]); + (ValueBuffer valueBuffer) => valueBuffer[54]); enum8.SetPropertyIndexes( - index: 50, - originalValueIndex: 50, + index: 54, + originalValueIndex: 54, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -3134,21 +3572,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum8Array.SetAccessors( (InternalEntityEntry entry) => ReadEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8Array, 51), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8Array, 55), (InternalEntityEntry entry) => entry.GetCurrentValue(enum8Array), - (ValueBuffer valueBuffer) => valueBuffer[51]); + (ValueBuffer valueBuffer) => valueBuffer[55]); enum8Array.SetPropertyIndexes( - index: 51, - originalValueIndex: 51, + index: 55, + originalValueIndex: 55, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), @@ -3160,14 +3598,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 value) => (short)value, (short value) => (CompiledModelTestBase.Enum8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -3214,12 +3652,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum8AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8AsString, 52), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8AsString, 56), (InternalEntityEntry entry) => entry.GetCurrentValue(enum8AsString), - (ValueBuffer valueBuffer) => valueBuffer[52]); + (ValueBuffer valueBuffer) => valueBuffer[56]); enum8AsString.SetPropertyIndexes( - index: 52, - originalValueIndex: 52, + index: 56, + originalValueIndex: 56, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -3269,21 +3707,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum8AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8AsStringArray, 53), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8AsStringArray, 57), (InternalEntityEntry entry) => entry.GetCurrentValue(enum8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[53]); + (ValueBuffer valueBuffer) => valueBuffer[57]); enum8AsStringArray.SetPropertyIndexes( - index: 53, - originalValueIndex: 53, + index: 57, + originalValueIndex: 57, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), @@ -3295,14 +3733,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -3353,21 +3791,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum8AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum8AsStringCollection, 54), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum8AsStringCollection, 58), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[54]); + (ValueBuffer valueBuffer) => valueBuffer[58]); enum8AsStringCollection.SetPropertyIndexes( - index: 54, - originalValueIndex: 54, + index: 58, + originalValueIndex: 58, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), @@ -3379,14 +3817,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -3437,21 +3875,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum8Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum8Collection, 55), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum8Collection, 59), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum8Collection), - (ValueBuffer valueBuffer) => valueBuffer[55]); + (ValueBuffer valueBuffer) => valueBuffer[59]); enum8Collection.SetPropertyIndexes( - index: 55, - originalValueIndex: 55, + index: 59, + originalValueIndex: 59, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), @@ -3463,14 +3901,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 value) => (short)value, (short value) => (CompiledModelTestBase.Enum8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -3499,6 +3937,117 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (short value) => (CompiledModelTestBase.Enum8)value)))); enum8Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var enum8NestedCollection = runtimeEntityType.AddProperty( + "Enum8NestedCollection", + typeof(CompiledModelTestBase.Enum8[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum8NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadEnum8NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadEnum8NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadEnum8NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadEnum8NestedCollection(instance) == null); + enum8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => WriteEnum8NestedCollection(entity, value)); + enum8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => WriteEnum8NestedCollection(entity, value)); + enum8NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8NestedCollection, 60), + (InternalEntityEntry entry) => entry.GetCurrentValue(enum8NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[60]); + enum8NestedCollection.SetPropertyIndexes( + index: 60, + originalValueIndex: 60, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value))), + elementMapping: SqlServerShortTypeMapping.Default.Clone( + comparer: new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + (short v1, short v2) => v1 == v2, + (short v) => (int)v, + (short v) => v), + converter: new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value))))); + enum8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var enumToNumberConverterProperty = runtimeEntityType.AddProperty( "EnumToNumberConverterProperty", typeof(CompiledModelTestBase.Enum32), @@ -3517,12 +4066,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumToNumberConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadEnumToNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumToNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumToNumberConverterProperty, 56), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumToNumberConverterProperty, 61), (InternalEntityEntry entry) => entry.GetCurrentValue(enumToNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[56]); + (ValueBuffer valueBuffer) => valueBuffer[61]); enumToNumberConverterProperty.SetPropertyIndexes( - index: 56, - originalValueIndex: 56, + index: 61, + originalValueIndex: 61, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -3568,12 +4117,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadEnumToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumToStringConverterProperty, 57), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumToStringConverterProperty, 62), (InternalEntityEntry entry) => entry.GetCurrentValue(enumToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[57]); + (ValueBuffer valueBuffer) => valueBuffer[62]); enumToStringConverterProperty.SetPropertyIndexes( - index: 57, - originalValueIndex: 57, + index: 62, + originalValueIndex: 62, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -3623,12 +4172,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU16.SetAccessors( (InternalEntityEntry entry) => ReadEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16, 58), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16, 63), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU16), - (ValueBuffer valueBuffer) => valueBuffer[58]); + (ValueBuffer valueBuffer) => valueBuffer[63]); enumU16.SetPropertyIndexes( - index: 58, - originalValueIndex: 58, + index: 63, + originalValueIndex: 63, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -3673,21 +4222,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU16Array.SetAccessors( (InternalEntityEntry entry) => ReadEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16Array, 59), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16Array, 64), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU16Array), - (ValueBuffer valueBuffer) => valueBuffer[59]); + (ValueBuffer valueBuffer) => valueBuffer[64]); enumU16Array.SetPropertyIndexes( - index: 59, - originalValueIndex: 59, + index: 64, + originalValueIndex: 64, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), @@ -3699,14 +4248,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 value) => (int)value, (int value) => (CompiledModelTestBase.EnumU16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -3753,12 +4302,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU16AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16AsString, 60), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16AsString, 65), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU16AsString), - (ValueBuffer valueBuffer) => valueBuffer[60]); + (ValueBuffer valueBuffer) => valueBuffer[65]); enumU16AsString.SetPropertyIndexes( - index: 60, - originalValueIndex: 60, + index: 65, + originalValueIndex: 65, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -3808,21 +4357,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU16AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16AsStringArray, 61), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16AsStringArray, 66), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[61]); + (ValueBuffer valueBuffer) => valueBuffer[66]); enumU16AsStringArray.SetPropertyIndexes( - index: 61, - originalValueIndex: 61, + index: 66, + originalValueIndex: 66, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), @@ -3834,14 +4383,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -3892,21 +4441,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU16AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU16AsStringCollection, 62), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU16AsStringCollection, 67), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[62]); + (ValueBuffer valueBuffer) => valueBuffer[67]); enumU16AsStringCollection.SetPropertyIndexes( - index: 62, - originalValueIndex: 62, + index: 67, + originalValueIndex: 67, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), @@ -3918,14 +4467,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -3976,21 +4525,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU16Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU16Collection, 63), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU16Collection, 68), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU16Collection), - (ValueBuffer valueBuffer) => valueBuffer[63]); + (ValueBuffer valueBuffer) => valueBuffer[68]); enumU16Collection.SetPropertyIndexes( - index: 63, - originalValueIndex: 63, + index: 68, + originalValueIndex: 68, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), @@ -4002,14 +4551,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 value) => (int)value, (int value) => (CompiledModelTestBase.EnumU16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -4055,12 +4604,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU32.SetAccessors( (InternalEntityEntry entry) => ReadEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32, 64), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32, 69), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU32), - (ValueBuffer valueBuffer) => valueBuffer[64]); + (ValueBuffer valueBuffer) => valueBuffer[69]); enumU32.SetPropertyIndexes( - index: 64, - originalValueIndex: 64, + index: 69, + originalValueIndex: 69, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -4105,21 +4654,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU32Array.SetAccessors( (InternalEntityEntry entry) => ReadEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32Array, 65), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32Array, 70), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU32Array), - (ValueBuffer valueBuffer) => valueBuffer[65]); + (ValueBuffer valueBuffer) => valueBuffer[70]); enumU32Array.SetPropertyIndexes( - index: 65, - originalValueIndex: 65, + index: 70, + originalValueIndex: 70, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), @@ -4131,14 +4680,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 value) => (long)value, (long value) => (CompiledModelTestBase.EnumU32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -4185,12 +4734,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU32AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32AsString, 66), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32AsString, 71), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU32AsString), - (ValueBuffer valueBuffer) => valueBuffer[66]); + (ValueBuffer valueBuffer) => valueBuffer[71]); enumU32AsString.SetPropertyIndexes( - index: 66, - originalValueIndex: 66, + index: 71, + originalValueIndex: 71, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -4240,21 +4789,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU32AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32AsStringArray, 67), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32AsStringArray, 72), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[67]); + (ValueBuffer valueBuffer) => valueBuffer[72]); enumU32AsStringArray.SetPropertyIndexes( - index: 67, - originalValueIndex: 67, + index: 72, + originalValueIndex: 72, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), @@ -4266,14 +4815,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -4324,21 +4873,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU32AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU32AsStringCollection, 68), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU32AsStringCollection, 73), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[68]); + (ValueBuffer valueBuffer) => valueBuffer[73]); enumU32AsStringCollection.SetPropertyIndexes( - index: 68, - originalValueIndex: 68, + index: 73, + originalValueIndex: 73, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), @@ -4350,14 +4899,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -4408,21 +4957,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU32Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU32Collection, 69), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU32Collection, 74), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU32Collection), - (ValueBuffer valueBuffer) => valueBuffer[69]); + (ValueBuffer valueBuffer) => valueBuffer[74]); enumU32Collection.SetPropertyIndexes( - index: 69, - originalValueIndex: 69, + index: 74, + originalValueIndex: 74, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), @@ -4434,14 +4983,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 value) => (long)value, (long value) => (CompiledModelTestBase.EnumU32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -4487,12 +5036,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU64.SetAccessors( (InternalEntityEntry entry) => ReadEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64, 70), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64, 75), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64), - (ValueBuffer valueBuffer) => valueBuffer[70]); + (ValueBuffer valueBuffer) => valueBuffer[75]); enumU64.SetPropertyIndexes( - index: 70, - originalValueIndex: 70, + index: 75, + originalValueIndex: 75, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -4541,21 +5090,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU64Array.SetAccessors( (InternalEntityEntry entry) => ReadEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64Array, 71), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64Array, 76), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64Array), - (ValueBuffer valueBuffer) => valueBuffer[71]); + (ValueBuffer valueBuffer) => valueBuffer[76]); enumU64Array.SetPropertyIndexes( - index: 71, - originalValueIndex: 71, + index: 76, + originalValueIndex: 76, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), @@ -4567,14 +5116,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -4625,12 +5174,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU64AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64AsString, 72), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64AsString, 77), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64AsString), - (ValueBuffer valueBuffer) => valueBuffer[72]); + (ValueBuffer valueBuffer) => valueBuffer[77]); enumU64AsString.SetPropertyIndexes( - index: 72, - originalValueIndex: 72, + index: 77, + originalValueIndex: 77, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -4680,21 +5229,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU64AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64AsStringArray, 73), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64AsStringArray, 78), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[73]); + (ValueBuffer valueBuffer) => valueBuffer[78]); enumU64AsStringArray.SetPropertyIndexes( - index: 73, - originalValueIndex: 73, + index: 78, + originalValueIndex: 78, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), @@ -4706,14 +5255,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -4764,21 +5313,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU64AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU64AsStringCollection, 74), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU64AsStringCollection, 79), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[74]); + (ValueBuffer valueBuffer) => valueBuffer[79]); enumU64AsStringCollection.SetPropertyIndexes( - index: 74, - originalValueIndex: 74, + index: 79, + originalValueIndex: 79, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), @@ -4790,14 +5339,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -4848,21 +5397,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU64Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU64Collection, 75), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU64Collection, 80), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU64Collection), - (ValueBuffer valueBuffer) => valueBuffer[75]); + (ValueBuffer valueBuffer) => valueBuffer[80]); enumU64Collection.SetPropertyIndexes( - index: 75, - originalValueIndex: 75, + index: 80, + originalValueIndex: 80, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), @@ -4874,14 +5423,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -4914,6 +5463,121 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); enumU64Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var enumU64NestedCollection = runtimeEntityType.AddProperty( + "EnumU64NestedCollection", + typeof(CompiledModelTestBase.EnumU64[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU64NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadEnumU64NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadEnumU64NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadEnumU64NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadEnumU64NestedCollection(instance) == null); + enumU64NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => WriteEnumU64NestedCollection(entity, value)); + enumU64NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => WriteEnumU64NestedCollection(entity, value)); + enumU64NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64NestedCollection, 81), + (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[81]); + enumU64NestedCollection.SetPropertyIndexes( + index: 81, + originalValueIndex: 81, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + elementMapping: SqlServerDecimalTypeMapping.Default.Clone( + comparer: new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + (decimal v1, decimal v2) => v1 == v2, + (decimal v) => v.GetHashCode(), + (decimal v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "decimal(20,0)", + precision: 20, + scale: 0), + converter: new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))); + enumU64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var enumU8 = runtimeEntityType.AddProperty( "EnumU8", typeof(CompiledModelTestBase.EnumU8), @@ -4931,12 +5595,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU8.SetAccessors( (InternalEntityEntry entry) => ReadEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8, 76), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8, 82), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU8), - (ValueBuffer valueBuffer) => valueBuffer[76]); + (ValueBuffer valueBuffer) => valueBuffer[82]); enumU8.SetPropertyIndexes( - index: 76, - originalValueIndex: 76, + index: 82, + originalValueIndex: 82, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -4981,21 +5645,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU8Array.SetAccessors( (InternalEntityEntry entry) => ReadEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8Array, 77), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8Array, 83), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU8Array), - (ValueBuffer valueBuffer) => valueBuffer[77]); + (ValueBuffer valueBuffer) => valueBuffer[83]); enumU8Array.SetPropertyIndexes( - index: 77, - originalValueIndex: 77, + index: 83, + originalValueIndex: 83, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), @@ -5007,14 +5671,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 value) => (byte)value, (byte value) => (CompiledModelTestBase.EnumU8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( @@ -5061,12 +5725,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU8AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8AsString, 78), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8AsString, 84), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU8AsString), - (ValueBuffer valueBuffer) => valueBuffer[78]); + (ValueBuffer valueBuffer) => valueBuffer[84]); enumU8AsString.SetPropertyIndexes( - index: 78, - originalValueIndex: 78, + index: 84, + originalValueIndex: 84, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5116,21 +5780,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU8AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8AsStringArray, 79), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8AsStringArray, 85), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[79]); + (ValueBuffer valueBuffer) => valueBuffer[85]); enumU8AsStringArray.SetPropertyIndexes( - index: 79, - originalValueIndex: 79, + index: 85, + originalValueIndex: 85, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), @@ -5142,14 +5806,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -5200,21 +5864,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU8AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU8AsStringCollection, 80), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU8AsStringCollection, 86), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[80]); + (ValueBuffer valueBuffer) => valueBuffer[86]); enumU8AsStringCollection.SetPropertyIndexes( - index: 80, - originalValueIndex: 80, + index: 86, + originalValueIndex: 86, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), @@ -5226,14 +5890,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -5284,21 +5948,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU8Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU8Collection, 81), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU8Collection, 87), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU8Collection), - (ValueBuffer valueBuffer) => valueBuffer[81]); + (ValueBuffer valueBuffer) => valueBuffer[87]); enumU8Collection.SetPropertyIndexes( - index: 81, - originalValueIndex: 81, + index: 87, + originalValueIndex: 87, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), @@ -5310,14 +5974,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 value) => (byte)value, (byte value) => (CompiledModelTestBase.EnumU8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( @@ -5364,12 +6028,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas @float.SetAccessors( (InternalEntityEntry entry) => ReadFloat((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadFloat((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(@float, 82), + (InternalEntityEntry entry) => entry.ReadOriginalValue(@float, 88), (InternalEntityEntry entry) => entry.GetCurrentValue(@float), - (ValueBuffer valueBuffer) => valueBuffer[82]); + (ValueBuffer valueBuffer) => valueBuffer[88]); @float.SetPropertyIndexes( - index: 82, - originalValueIndex: 82, + index: 88, + originalValueIndex: 88, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5405,21 +6069,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas floatArray.SetAccessors( (InternalEntityEntry entry) => ReadFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(floatArray, 83), + (InternalEntityEntry entry) => entry.ReadOriginalValue(floatArray, 89), (InternalEntityEntry entry) => entry.GetCurrentValue(floatArray), - (ValueBuffer valueBuffer) => valueBuffer[83]); + (ValueBuffer valueBuffer) => valueBuffer[89]); floatArray.SetPropertyIndexes( - index: 83, - originalValueIndex: 83, + index: 89, + originalValueIndex: 89, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); floatArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (float v1, float v2) => v1.Equals(v2), (float v) => v.GetHashCode(), (float v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (float v1, float v2) => v1.Equals(v2), (float v) => v.GetHashCode(), (float v) => v)), @@ -5431,10 +6095,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonFloatReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonFloatReaderWriter.Instance), elementMapping: SqlServerFloatTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -5469,12 +6133,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas guid.SetAccessors( (InternalEntityEntry entry) => ReadGuid((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadGuid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(guid, 84), + (InternalEntityEntry entry) => entry.ReadOriginalValue(guid, 90), (InternalEntityEntry entry) => entry.GetCurrentValue(guid), - (ValueBuffer valueBuffer) => valueBuffer[84]); + (ValueBuffer valueBuffer) => valueBuffer[90]); guid.SetPropertyIndexes( - index: 84, - originalValueIndex: 84, + index: 90, + originalValueIndex: 90, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5512,21 +6176,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas guidArray.SetAccessors( (InternalEntityEntry entry) => ReadGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(guidArray, 85), + (InternalEntityEntry entry) => entry.ReadOriginalValue(guidArray, 91), (InternalEntityEntry entry) => entry.GetCurrentValue(guidArray), - (ValueBuffer valueBuffer) => valueBuffer[85]); + (ValueBuffer valueBuffer) => valueBuffer[91]); guidArray.SetPropertyIndexes( - index: 85, - originalValueIndex: 85, + index: 91, + originalValueIndex: 91, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); guidArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (Guid v1, Guid v2) => v1 == v2, (Guid v) => v.GetHashCode(), (Guid v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (Guid v1, Guid v2) => v1 == v2, (Guid v) => v.GetHashCode(), (Guid v) => v)), @@ -5538,10 +6202,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonGuidReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonGuidReaderWriter.Instance), elementMapping: GuidTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -5560,6 +6224,121 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "uniqueidentifier"))); guidArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var guidNestedCollection = runtimeEntityType.AddProperty( + "GuidNestedCollection", + typeof(ICollection), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + guidNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadGuidNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadGuidNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadGuidNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadGuidNestedCollection(instance) == null); + guidNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, ICollection value) => WriteGuidNestedCollection(entity, value)); + guidNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, ICollection value) => WriteGuidNestedCollection(entity, value)); + guidNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(guidNestedCollection, 92), + (InternalEntityEntry entry) => entry.GetCurrentValue>(guidNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[92]); + guidNestedCollection.SetPropertyIndexes( + index: 92, + originalValueIndex: 92, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + guidNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, Guid[][]>(new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v)))), + keyComparer: new ListOfReferenceTypesComparer, Guid[][]>(new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, Guid[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonGuidReaderWriter.Instance)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, Guid[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonGuidReaderWriter.Instance))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonGuidReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonGuidReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + JsonGuidReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonGuidReaderWriter.Instance), + elementMapping: GuidTypeMapping.Default.Clone( + comparer: new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v), + keyComparer: new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v), + providerValueComparer: new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "uniqueidentifier"))))); + guidNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var guidToBytesConverterProperty = runtimeEntityType.AddProperty( "GuidToBytesConverterProperty", typeof(Guid), @@ -5578,12 +6357,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas guidToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadGuidToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadGuidToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(guidToBytesConverterProperty, 86), + (InternalEntityEntry entry) => entry.ReadOriginalValue(guidToBytesConverterProperty, 93), (InternalEntityEntry entry) => entry.GetCurrentValue(guidToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[86]); + (ValueBuffer valueBuffer) => valueBuffer[93]); guidToBytesConverterProperty.SetPropertyIndexes( - index: 86, - originalValueIndex: 86, + index: 93, + originalValueIndex: 93, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5632,12 +6411,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas guidToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadGuidToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadGuidToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(guidToStringConverterProperty, 87), + (InternalEntityEntry entry) => entry.ReadOriginalValue(guidToStringConverterProperty, 94), (InternalEntityEntry entry) => entry.GetCurrentValue(guidToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[87]); + (ValueBuffer valueBuffer) => valueBuffer[94]); guidToStringConverterProperty.SetPropertyIndexes( - index: 87, - originalValueIndex: 87, + index: 94, + originalValueIndex: 94, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5687,12 +6466,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas iPAddress.SetAccessors( (InternalEntityEntry entry) => ReadIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddress, 88), + (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddress, 95), (InternalEntityEntry entry) => entry.GetCurrentValue(iPAddress), - (ValueBuffer valueBuffer) => valueBuffer[88]); + (ValueBuffer valueBuffer) => valueBuffer[95]); iPAddress.SetPropertyIndexes( - index: 88, - originalValueIndex: 88, + index: 95, + originalValueIndex: 95, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5741,21 +6520,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas iPAddressArray.SetAccessors( (InternalEntityEntry entry) => ReadIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressArray, 89), + (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressArray, 96), (InternalEntityEntry entry) => entry.GetCurrentValue(iPAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[89]); + (ValueBuffer valueBuffer) => valueBuffer[96]); iPAddressArray.SetPropertyIndexes( - index: 89, - originalValueIndex: 89, + index: 96, + originalValueIndex: 96, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); iPAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -5767,14 +6546,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -5826,13 +6605,13 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas iPAddressToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadIPAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadIPAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressToBytesConverterProperty, 90), + (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressToBytesConverterProperty, 97), (InternalEntityEntry entry) => entry.GetCurrentValue(iPAddressToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[90]); + (ValueBuffer valueBuffer) => valueBuffer[97]); iPAddressToBytesConverterProperty.SetPropertyIndexes( - index: 90, - originalValueIndex: 90, - shadowIndex: -1, + index: 97, + originalValueIndex: 97, + shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); iPAddressToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( @@ -5879,12 +6658,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas iPAddressToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadIPAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadIPAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressToStringConverterProperty, 91), + (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressToStringConverterProperty, 98), (InternalEntityEntry entry) => entry.GetCurrentValue(iPAddressToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[91]); + (ValueBuffer valueBuffer) => valueBuffer[98]); iPAddressToStringConverterProperty.SetPropertyIndexes( - index: 91, - originalValueIndex: 91, + index: 98, + originalValueIndex: 98, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5934,12 +6713,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int16.SetAccessors( (InternalEntityEntry entry) => ReadInt16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int16, 92), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int16, 99), (InternalEntityEntry entry) => entry.GetCurrentValue(int16), - (ValueBuffer valueBuffer) => valueBuffer[92]); + (ValueBuffer valueBuffer) => valueBuffer[99]); int16.SetPropertyIndexes( - index: 92, - originalValueIndex: 92, + index: 99, + originalValueIndex: 99, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5975,21 +6754,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int16Array.SetAccessors( (InternalEntityEntry entry) => ReadInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int16Array, 93), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int16Array, 100), (InternalEntityEntry entry) => entry.GetCurrentValue(int16Array), - (ValueBuffer valueBuffer) => valueBuffer[93]); + (ValueBuffer valueBuffer) => valueBuffer[100]); int16Array.SetPropertyIndexes( - index: 93, - originalValueIndex: 93, + index: 100, + originalValueIndex: 100, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); int16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), @@ -6001,10 +6780,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonInt16ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -6039,12 +6818,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int32.SetAccessors( (InternalEntityEntry entry) => ReadInt32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int32, 94), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int32, 101), (InternalEntityEntry entry) => entry.GetCurrentValue(int32), - (ValueBuffer valueBuffer) => valueBuffer[94]); + (ValueBuffer valueBuffer) => valueBuffer[101]); int32.SetPropertyIndexes( - index: 94, - originalValueIndex: 94, + index: 101, + originalValueIndex: 101, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6080,21 +6859,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int32Array.SetAccessors( (InternalEntityEntry entry) => ReadInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int32Array, 95), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int32Array, 102), (InternalEntityEntry entry) => entry.GetCurrentValue(int32Array), - (ValueBuffer valueBuffer) => valueBuffer[95]); + (ValueBuffer valueBuffer) => valueBuffer[102]); int32Array.SetPropertyIndexes( - index: 95, - originalValueIndex: 95, + index: 102, + originalValueIndex: 102, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); int32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (int v1, int v2) => v1 == v2, (int v) => v, (int v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (int v1, int v2) => v1 == v2, (int v) => v, (int v) => v)), @@ -6106,10 +6885,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonInt32ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -6126,6 +6905,93 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (int v) => v))); int32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var int32NestedCollection = runtimeEntityType.AddProperty( + "Int32NestedCollection", + typeof(int[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + int32NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadInt32NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadInt32NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadInt32NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadInt32NestedCollection(instance) == null); + int32NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, int[][] value) => WriteInt32NestedCollection(entity, value)); + int32NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, int[][] value) => WriteInt32NestedCollection(entity, value)); + int32NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int32NestedCollection, 103), + (InternalEntityEntry entry) => entry.GetCurrentValue(int32NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[103]); + int32NestedCollection.SetPropertyIndexes( + index: 103, + originalValueIndex: 103, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonInt32ReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonInt32ReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + JsonInt32ReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonInt32ReaderWriter.Instance), + elementMapping: IntTypeMapping.Default.Clone( + comparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v), + keyComparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v), + providerValueComparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v)))); + int32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var int64 = runtimeEntityType.AddProperty( "Int64", typeof(long), @@ -6144,12 +7010,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int64.SetAccessors( (InternalEntityEntry entry) => ReadInt64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int64, 96), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int64, 104), (InternalEntityEntry entry) => entry.GetCurrentValue(int64), - (ValueBuffer valueBuffer) => valueBuffer[96]); + (ValueBuffer valueBuffer) => valueBuffer[104]); int64.SetPropertyIndexes( - index: 96, - originalValueIndex: 96, + index: 104, + originalValueIndex: 104, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6185,21 +7051,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int64Array.SetAccessors( (InternalEntityEntry entry) => ReadInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int64Array, 97), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int64Array, 105), (InternalEntityEntry entry) => entry.GetCurrentValue(int64Array), - (ValueBuffer valueBuffer) => valueBuffer[97]); + (ValueBuffer valueBuffer) => valueBuffer[105]); int64Array.SetPropertyIndexes( - index: 97, - originalValueIndex: 97, + index: 105, + originalValueIndex: 105, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); int64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (long v1, long v2) => v1 == v2, (long v) => v.GetHashCode(), (long v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (long v1, long v2) => v1 == v2, (long v) => v.GetHashCode(), (long v) => v)), @@ -6211,10 +7077,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonInt64ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonInt64ReaderWriter.Instance), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -6231,6 +7097,119 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (long v) => v))); int64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var int64NestedCollection = runtimeEntityType.AddProperty( + "Int64NestedCollection", + typeof(IList[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + int64NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadInt64NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadInt64NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadInt64NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadInt64NestedCollection(instance) == null); + int64NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, IList[] value) => WriteInt64NestedCollection(entity, value)); + int64NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, IList[] value) => WriteInt64NestedCollection(entity, value)); + int64NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(int64NestedCollection, 106), + (InternalEntityEntry entry) => entry.GetCurrentValue[]>(int64NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[106]); + int64NestedCollection.SetPropertyIndexes( + index: 106, + originalValueIndex: 106, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer[], IList>(new ListOfReferenceTypesComparer, long[]>(new ListOfValueTypesComparer(new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v)))), + keyComparer: new ListOfReferenceTypesComparer[], IList>(new ListOfReferenceTypesComparer, long[]>(new ListOfValueTypesComparer(new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter>(new JsonCollectionOfReferencesReaderWriter[], IList>( + new JsonCollectionOfReferencesReaderWriter, long[]>( + new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter[], IList>( + new JsonCollectionOfReferencesReaderWriter, long[]>( + new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, long[]>(new ListOfValueTypesComparer(new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v))), + keyComparer: new ListOfReferenceTypesComparer, long[]>(new ListOfValueTypesComparer(new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, long[]>( + new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, long[]>( + new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance), + elementMapping: SqlServerLongTypeMapping.Default.Clone( + comparer: new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v), + keyComparer: new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v), + providerValueComparer: new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v))))); + int64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var int8 = runtimeEntityType.AddProperty( "Int8", typeof(sbyte), @@ -6248,12 +7227,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int8.SetAccessors( (InternalEntityEntry entry) => ReadInt8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int8, 98), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int8, 107), (InternalEntityEntry entry) => entry.GetCurrentValue(int8), - (ValueBuffer valueBuffer) => valueBuffer[98]); + (ValueBuffer valueBuffer) => valueBuffer[107]); int8.SetPropertyIndexes( - index: 98, - originalValueIndex: 98, + index: 107, + originalValueIndex: 107, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6298,21 +7277,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int8Array.SetAccessors( (InternalEntityEntry entry) => ReadInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int8Array, 99), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int8Array, 108), (InternalEntityEntry entry) => entry.GetCurrentValue(int8Array), - (ValueBuffer valueBuffer) => valueBuffer[99]); + (ValueBuffer valueBuffer) => valueBuffer[108]); int8Array.SetPropertyIndexes( - index: 99, - originalValueIndex: 99, + index: 108, + originalValueIndex: 108, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); int8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (sbyte v1, sbyte v2) => v1 == v2, (sbyte v) => (int)v, (sbyte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (sbyte v1, sbyte v2) => v1 == v2, (sbyte v) => (int)v, (sbyte v) => v)), @@ -6324,14 +7303,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (sbyte v) => (short)v, (short v) => (sbyte)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -6360,6 +7339,151 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (short v) => (sbyte)v)))); int8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var int8NestedCollection = runtimeEntityType.AddProperty( + "Int8NestedCollection", + typeof(sbyte[][][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + int8NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadInt8NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadInt8NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadInt8NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadInt8NestedCollection(instance) == null); + int8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => WriteInt8NestedCollection(entity, value)); + int8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => WriteInt8NestedCollection(entity, value)); + int8NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int8NestedCollection, 109), + (InternalEntityEntry entry) => entry.GetCurrentValue(int8NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[109]); + int8NestedCollection.SetPropertyIndexes( + index: 109, + originalValueIndex: 109, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v)))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v))))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v))), + elementMapping: SqlServerShortTypeMapping.Default.Clone( + comparer: new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v), + keyComparer: new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v), + providerValueComparer: new ValueComparer( + (short v1, short v2) => v1 == v2, + (short v) => (int)v, + (short v) => v), + converter: new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v)))))); + int8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var intNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "IntNumberToBytesConverterProperty", typeof(int), @@ -6378,12 +7502,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas intNumberToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadIntNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadIntNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(intNumberToBytesConverterProperty, 100), + (InternalEntityEntry entry) => entry.ReadOriginalValue(intNumberToBytesConverterProperty, 110), (InternalEntityEntry entry) => entry.GetCurrentValue(intNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[100]); + (ValueBuffer valueBuffer) => valueBuffer[110]); intNumberToBytesConverterProperty.SetPropertyIndexes( - index: 100, - originalValueIndex: 100, + index: 110, + originalValueIndex: 110, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6432,12 +7556,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas intNumberToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadIntNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadIntNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(intNumberToStringConverterProperty, 101), + (InternalEntityEntry entry) => entry.ReadOriginalValue(intNumberToStringConverterProperty, 111), (InternalEntityEntry entry) => entry.GetCurrentValue(intNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[101]); + (ValueBuffer valueBuffer) => valueBuffer[111]); intNumberToStringConverterProperty.SetPropertyIndexes( - index: 101, - originalValueIndex: 101, + index: 111, + originalValueIndex: 111, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6489,12 +7613,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullIntToNullStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadNullIntToNullStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullIntToNullStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullIntToNullStringConverterProperty, 102), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullIntToNullStringConverterProperty, 112), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullIntToNullStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[102]); + (ValueBuffer valueBuffer) => valueBuffer[112]); nullIntToNullStringConverterProperty.SetPropertyIndexes( - index: 102, - originalValueIndex: 102, + index: 112, + originalValueIndex: 112, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6546,12 +7670,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableBool.SetAccessors( (InternalEntityEntry entry) => ReadNullableBool((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableBool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableBool, 103), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableBool, 113), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableBool), - (ValueBuffer valueBuffer) => valueBuffer[103]); + (ValueBuffer valueBuffer) => valueBuffer[113]); nullableBool.SetPropertyIndexes( - index: 103, - originalValueIndex: 103, + index: 113, + originalValueIndex: 113, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6587,21 +7711,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableBoolArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableBoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableBoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableBoolArray, 104), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableBoolArray, 114), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableBoolArray), - (ValueBuffer valueBuffer) => valueBuffer[104]); + (ValueBuffer valueBuffer) => valueBuffer[114]); nullableBoolArray.SetPropertyIndexes( - index: 104, - originalValueIndex: 104, + index: 114, + originalValueIndex: 114, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableBoolArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (bool)v1 == (bool)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((bool)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(bool)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (bool)v1 == (bool)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((bool)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(bool)v : default(Nullable))), @@ -6613,10 +7737,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonBoolReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonBoolReaderWriter.Instance), elementMapping: SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -6651,12 +7775,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableBytes.SetAccessors( (InternalEntityEntry entry) => ReadNullableBytes((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableBytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytes, 105), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytes, 115), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableBytes), - (ValueBuffer valueBuffer) => valueBuffer[105]); + (ValueBuffer valueBuffer) => valueBuffer[115]); nullableBytes.SetPropertyIndexes( - index: 105, - originalValueIndex: 105, + index: 115, + originalValueIndex: 115, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6695,21 +7819,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableBytesArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytesArray, 106), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytesArray, 116), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableBytesArray), - (ValueBuffer valueBuffer) => valueBuffer[106]); + (ValueBuffer valueBuffer) => valueBuffer[116]); nullableBytesArray.SetPropertyIndexes( - index: 106, - originalValueIndex: 106, + index: 116, + originalValueIndex: 116, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableBytesArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), (byte[] v) => v.GetHashCode(), (byte[] v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), (byte[] v) => v.GetHashCode(), (byte[] v) => v)), @@ -6721,10 +7845,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( JsonByteArrayReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -6744,6 +7868,96 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypePostfix: StoreTypePostfix.None)); nullableBytesArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableBytesNestedCollection = runtimeEntityType.AddProperty( + "NullableBytesNestedCollection", + typeof(byte[][][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBytesNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableBytesNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableBytesNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableBytesNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableBytesNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableBytesNestedCollection(instance) == null); + nullableBytesNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => WriteNullableBytesNestedCollection(entity, value)); + nullableBytesNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => WriteNullableBytesNestedCollection(entity, value)); + nullableBytesNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytesNestedCollection, 117), + (InternalEntityEntry entry) => entry.GetCurrentValue(nullableBytesNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[117]); + nullableBytesNestedCollection.SetPropertyIndexes( + index: 117, + originalValueIndex: 117, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableBytesNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v)), + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance), + elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( + comparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v), + keyComparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), + (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), + (byte[] source) => source.ToArray()), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "varbinary(max)"), + storeTypePostfix: StoreTypePostfix.None))); + nullableBytesNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableChar = runtimeEntityType.AddProperty( "NullableChar", typeof(char?), @@ -6762,12 +7976,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableChar.SetAccessors( (InternalEntityEntry entry) => ReadNullableChar((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableChar((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableChar, 107), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableChar, 118), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableChar), - (ValueBuffer valueBuffer) => valueBuffer[107]); + (ValueBuffer valueBuffer) => valueBuffer[118]); nullableChar.SetPropertyIndexes( - index: 107, - originalValueIndex: 107, + index: 118, + originalValueIndex: 118, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6816,21 +8030,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableCharArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableCharArray, 108), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableCharArray, 119), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableCharArray), - (ValueBuffer valueBuffer) => valueBuffer[108]); + (ValueBuffer valueBuffer) => valueBuffer[119]); nullableCharArray.SetPropertyIndexes( - index: 108, - originalValueIndex: 108, + index: 119, + originalValueIndex: 119, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableCharArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (char)v1 == (char)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(char)v : 0, (Nullable v) => v.HasValue ? (Nullable)(char)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (char)v1 == (char)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(char)v : 0, (Nullable v) => v.HasValue ? (Nullable)(char)v : default(Nullable))), @@ -6842,14 +8056,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), (string v) => v.Length < 1 ? '\0' : v[0])))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -6901,12 +8115,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDateOnly.SetAccessors( (InternalEntityEntry entry) => ReadNullableDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDateOnly, 109), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDateOnly, 120), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableDateOnly), - (ValueBuffer valueBuffer) => valueBuffer[109]); + (ValueBuffer valueBuffer) => valueBuffer[120]); nullableDateOnly.SetPropertyIndexes( - index: 109, - originalValueIndex: 109, + index: 120, + originalValueIndex: 120, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6942,21 +8156,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDateOnlyArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDateOnlyArray, 110), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDateOnlyArray, 121), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableDateOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[110]); + (ValueBuffer valueBuffer) => valueBuffer[121]); nullableDateOnlyArray.SetPropertyIndexes( - index: 110, - originalValueIndex: 110, + index: 121, + originalValueIndex: 121, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableDateOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (DateOnly)v1 == (DateOnly)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((DateOnly)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(DateOnly)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (DateOnly)v1 == (DateOnly)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((DateOnly)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(DateOnly)v : default(Nullable))), @@ -6968,10 +8182,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonDateOnlyReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonDateOnlyReaderWriter.Instance), elementMapping: SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -7006,12 +8220,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDateTime.SetAccessors( (InternalEntityEntry entry) => ReadNullableDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDateTime, 111), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDateTime, 122), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableDateTime), - (ValueBuffer valueBuffer) => valueBuffer[111]); + (ValueBuffer valueBuffer) => valueBuffer[122]); nullableDateTime.SetPropertyIndexes( - index: 111, - originalValueIndex: 111, + index: 122, + originalValueIndex: 122, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7047,21 +8261,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDateTimeArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDateTimeArray, 112), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDateTimeArray, 123), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableDateTimeArray), - (ValueBuffer valueBuffer) => valueBuffer[112]); + (ValueBuffer valueBuffer) => valueBuffer[123]); nullableDateTimeArray.SetPropertyIndexes( - index: 112, - originalValueIndex: 112, + index: 123, + originalValueIndex: 123, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableDateTimeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (DateTime)v1 == (DateTime)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((DateTime)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(DateTime)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (DateTime)v1 == (DateTime)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((DateTime)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(DateTime)v : default(Nullable))), @@ -7073,10 +8287,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -7111,12 +8325,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDecimal.SetAccessors( (InternalEntityEntry entry) => ReadNullableDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDecimal, 113), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDecimal, 124), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableDecimal), - (ValueBuffer valueBuffer) => valueBuffer[113]); + (ValueBuffer valueBuffer) => valueBuffer[124]); nullableDecimal.SetPropertyIndexes( - index: 113, - originalValueIndex: 113, + index: 124, + originalValueIndex: 124, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7152,21 +8366,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDecimalArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDecimalArray, 114), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDecimalArray, 125), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableDecimalArray), - (ValueBuffer valueBuffer) => valueBuffer[114]); + (ValueBuffer valueBuffer) => valueBuffer[125]); nullableDecimalArray.SetPropertyIndexes( - index: 114, - originalValueIndex: 114, + index: 125, + originalValueIndex: 125, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableDecimalArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (decimal)v1 == (decimal)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((decimal)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(decimal)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (decimal)v1 == (decimal)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((decimal)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(decimal)v : default(Nullable))), @@ -7178,10 +8392,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonDecimalReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonDecimalReaderWriter.Instance), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -7216,12 +8430,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDouble.SetAccessors( (InternalEntityEntry entry) => ReadNullableDouble((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDouble((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDouble, 115), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDouble, 126), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableDouble), - (ValueBuffer valueBuffer) => valueBuffer[115]); + (ValueBuffer valueBuffer) => valueBuffer[126]); nullableDouble.SetPropertyIndexes( - index: 115, - originalValueIndex: 115, + index: 126, + originalValueIndex: 126, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7257,21 +8471,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDoubleArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDoubleArray, 116), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDoubleArray, 127), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableDoubleArray), - (ValueBuffer valueBuffer) => valueBuffer[116]); + (ValueBuffer valueBuffer) => valueBuffer[127]); nullableDoubleArray.SetPropertyIndexes( - index: 116, - originalValueIndex: 116, + index: 127, + originalValueIndex: 127, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableDoubleArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && ((double)v1).Equals((double)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((double)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(double)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && ((double)v1).Equals((double)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((double)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(double)v : default(Nullable))), @@ -7283,10 +8497,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonDoubleReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonDoubleReaderWriter.Instance), elementMapping: SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -7321,12 +8535,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum16.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum16, 117), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum16, 128), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum16), - (ValueBuffer valueBuffer) => valueBuffer[117]); + (ValueBuffer valueBuffer) => valueBuffer[128]); nullableEnum16.SetPropertyIndexes( - index: 117, - originalValueIndex: 117, + index: 128, + originalValueIndex: 128, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7370,21 +8584,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum16Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum16Array, 118), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum16Array, 129), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum16Array), - (ValueBuffer valueBuffer) => valueBuffer[118]); + (ValueBuffer valueBuffer) => valueBuffer[129]); nullableEnum16Array.SetPropertyIndexes( - index: 118, - originalValueIndex: 118, + index: 129, + originalValueIndex: 129, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), @@ -7396,14 +8610,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 value) => (short)value, (short value) => (CompiledModelTestBase.Enum16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -7450,12 +8664,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum16AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum16AsString, 119), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum16AsString, 130), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum16AsString), - (ValueBuffer valueBuffer) => valueBuffer[119]); + (ValueBuffer valueBuffer) => valueBuffer[130]); nullableEnum16AsString.SetPropertyIndexes( - index: 119, - originalValueIndex: 119, + index: 130, + originalValueIndex: 130, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7499,21 +8713,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum16AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum16AsStringArray, 120), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum16AsStringArray, 131), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[120]); + (ValueBuffer valueBuffer) => valueBuffer[131]); nullableEnum16AsStringArray.SetPropertyIndexes( - index: 120, - originalValueIndex: 120, + index: 131, + originalValueIndex: 131, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), @@ -7525,14 +8739,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 value) => (short)value, (short value) => (CompiledModelTestBase.Enum16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -7578,21 +8792,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum16AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum16AsStringCollection, 121), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum16AsStringCollection, 132), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[121]); + (ValueBuffer valueBuffer) => valueBuffer[132]); nullableEnum16AsStringCollection.SetPropertyIndexes( - index: 121, - originalValueIndex: 121, + index: 132, + originalValueIndex: 132, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), @@ -7604,14 +8818,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 value) => (short)value, (short value) => (CompiledModelTestBase.Enum16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -7657,21 +8871,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum16Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum16Collection, 122), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum16Collection, 133), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum16Collection), - (ValueBuffer valueBuffer) => valueBuffer[122]); + (ValueBuffer valueBuffer) => valueBuffer[133]); nullableEnum16Collection.SetPropertyIndexes( - index: 122, - originalValueIndex: 122, + index: 133, + originalValueIndex: 133, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), @@ -7683,14 +8897,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 value) => (short)value, (short value) => (CompiledModelTestBase.Enum16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -7737,12 +8951,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum32.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum32, 123), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum32, 134), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum32), - (ValueBuffer valueBuffer) => valueBuffer[123]); + (ValueBuffer valueBuffer) => valueBuffer[134]); nullableEnum32.SetPropertyIndexes( - index: 123, - originalValueIndex: 123, + index: 134, + originalValueIndex: 134, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7786,21 +9000,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum32Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum32Array, 124), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum32Array, 135), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum32Array), - (ValueBuffer valueBuffer) => valueBuffer[124]); + (ValueBuffer valueBuffer) => valueBuffer[135]); nullableEnum32Array.SetPropertyIndexes( - index: 124, - originalValueIndex: 124, + index: 135, + originalValueIndex: 135, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), @@ -7812,14 +9026,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 value) => (int)value, (int value) => (CompiledModelTestBase.Enum32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -7866,12 +9080,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum32AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum32AsString, 125), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum32AsString, 136), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum32AsString), - (ValueBuffer valueBuffer) => valueBuffer[125]); + (ValueBuffer valueBuffer) => valueBuffer[136]); nullableEnum32AsString.SetPropertyIndexes( - index: 125, - originalValueIndex: 125, + index: 136, + originalValueIndex: 136, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7915,21 +9129,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum32AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum32AsStringArray, 126), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum32AsStringArray, 137), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[126]); + (ValueBuffer valueBuffer) => valueBuffer[137]); nullableEnum32AsStringArray.SetPropertyIndexes( - index: 126, - originalValueIndex: 126, + index: 137, + originalValueIndex: 137, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), @@ -7941,14 +9155,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 value) => (int)value, (int value) => (CompiledModelTestBase.Enum32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -7994,21 +9208,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum32AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum32AsStringCollection, 127), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum32AsStringCollection, 138), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[127]); + (ValueBuffer valueBuffer) => valueBuffer[138]); nullableEnum32AsStringCollection.SetPropertyIndexes( - index: 127, - originalValueIndex: 127, + index: 138, + originalValueIndex: 138, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), @@ -8020,14 +9234,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 value) => (int)value, (int value) => (CompiledModelTestBase.Enum32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -8073,21 +9287,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum32Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum32Collection, 128), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum32Collection, 139), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum32Collection), - (ValueBuffer valueBuffer) => valueBuffer[128]); + (ValueBuffer valueBuffer) => valueBuffer[139]); nullableEnum32Collection.SetPropertyIndexes( - index: 128, - originalValueIndex: 128, + index: 139, + originalValueIndex: 139, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), @@ -8099,14 +9313,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 value) => (int)value, (int value) => (CompiledModelTestBase.Enum32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -8135,6 +9349,151 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (int value) => (CompiledModelTestBase.Enum32)value)))); nullableEnum32Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableEnum32NestedCollection = runtimeEntityType.AddProperty( + "NullableEnum32NestedCollection", + typeof(CompiledModelTestBase.Enum32?[][][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum32NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableEnum32NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableEnum32NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableEnum32NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableEnum32NestedCollection(instance) == null); + nullableEnum32NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][][] value) => WriteNullableEnum32NestedCollection(entity, value)); + nullableEnum32NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][][] value) => WriteNullableEnum32NestedCollection(entity, value)); + nullableEnum32NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][][]>(nullableEnum32NestedCollection, 140), + (InternalEntityEntry entry) => entry.GetCurrentValue[][][]>(nullableEnum32NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[140]); + nullableEnum32NestedCollection.SetPropertyIndexes( + index: 140, + originalValueIndex: 140, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value))))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value))), + elementMapping: IntTypeMapping.Default.Clone( + comparer: new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v), + converter: new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))))); + nullableEnum32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableEnum64 = runtimeEntityType.AddProperty( "NullableEnum64", typeof(CompiledModelTestBase.Enum64?), @@ -8153,12 +9512,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum64.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum64, 129), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum64, 141), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum64), - (ValueBuffer valueBuffer) => valueBuffer[129]); + (ValueBuffer valueBuffer) => valueBuffer[141]); nullableEnum64.SetPropertyIndexes( - index: 129, - originalValueIndex: 129, + index: 141, + originalValueIndex: 141, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -8202,21 +9561,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum64Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum64Array, 130), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum64Array, 142), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum64Array), - (ValueBuffer valueBuffer) => valueBuffer[130]); + (ValueBuffer valueBuffer) => valueBuffer[142]); nullableEnum64Array.SetPropertyIndexes( - index: 130, - originalValueIndex: 130, + index: 142, + originalValueIndex: 142, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), @@ -8228,14 +9587,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 value) => (long)value, (long value) => (CompiledModelTestBase.Enum64)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -8282,12 +9641,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum64AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum64AsString, 131), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum64AsString, 143), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum64AsString), - (ValueBuffer valueBuffer) => valueBuffer[131]); + (ValueBuffer valueBuffer) => valueBuffer[143]); nullableEnum64AsString.SetPropertyIndexes( - index: 131, - originalValueIndex: 131, + index: 143, + originalValueIndex: 143, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -8331,21 +9690,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum64AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum64AsStringArray, 132), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum64AsStringArray, 144), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[132]); + (ValueBuffer valueBuffer) => valueBuffer[144]); nullableEnum64AsStringArray.SetPropertyIndexes( - index: 132, - originalValueIndex: 132, + index: 144, + originalValueIndex: 144, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), @@ -8357,14 +9716,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 value) => (long)value, (long value) => (CompiledModelTestBase.Enum64)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -8410,21 +9769,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum64AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum64AsStringCollection, 133), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum64AsStringCollection, 145), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[133]); + (ValueBuffer valueBuffer) => valueBuffer[145]); nullableEnum64AsStringCollection.SetPropertyIndexes( - index: 133, - originalValueIndex: 133, + index: 145, + originalValueIndex: 145, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), @@ -8436,14 +9795,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 value) => (long)value, (long value) => (CompiledModelTestBase.Enum64)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -8489,21 +9848,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum64Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum64Collection, 134), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum64Collection, 146), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum64Collection), - (ValueBuffer valueBuffer) => valueBuffer[134]); + (ValueBuffer valueBuffer) => valueBuffer[146]); nullableEnum64Collection.SetPropertyIndexes( - index: 134, - originalValueIndex: 134, + index: 146, + originalValueIndex: 146, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), @@ -8515,14 +9874,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 value) => (long)value, (long value) => (CompiledModelTestBase.Enum64)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -8569,12 +9928,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum8.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum8, 135), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum8, 147), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum8), - (ValueBuffer valueBuffer) => valueBuffer[135]); + (ValueBuffer valueBuffer) => valueBuffer[147]); nullableEnum8.SetPropertyIndexes( - index: 135, - originalValueIndex: 135, + index: 147, + originalValueIndex: 147, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -8618,21 +9977,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum8Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum8Array, 136), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum8Array, 148), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum8Array), - (ValueBuffer valueBuffer) => valueBuffer[136]); + (ValueBuffer valueBuffer) => valueBuffer[148]); nullableEnum8Array.SetPropertyIndexes( - index: 136, - originalValueIndex: 136, + index: 148, + originalValueIndex: 148, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), @@ -8644,14 +10003,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 value) => (short)value, (short value) => (CompiledModelTestBase.Enum8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -8698,12 +10057,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum8AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum8AsString, 137), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum8AsString, 149), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum8AsString), - (ValueBuffer valueBuffer) => valueBuffer[137]); + (ValueBuffer valueBuffer) => valueBuffer[149]); nullableEnum8AsString.SetPropertyIndexes( - index: 137, - originalValueIndex: 137, + index: 149, + originalValueIndex: 149, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -8747,21 +10106,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum8AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum8AsStringArray, 138), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum8AsStringArray, 150), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[138]); + (ValueBuffer valueBuffer) => valueBuffer[150]); nullableEnum8AsStringArray.SetPropertyIndexes( - index: 138, - originalValueIndex: 138, + index: 150, + originalValueIndex: 150, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), @@ -8773,14 +10132,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 value) => (short)value, (short value) => (CompiledModelTestBase.Enum8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -8826,21 +10185,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum8AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum8AsStringCollection, 139), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum8AsStringCollection, 151), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[139]); + (ValueBuffer valueBuffer) => valueBuffer[151]); nullableEnum8AsStringCollection.SetPropertyIndexes( - index: 139, - originalValueIndex: 139, + index: 151, + originalValueIndex: 151, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), @@ -8852,14 +10211,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 value) => (short)value, (short value) => (CompiledModelTestBase.Enum8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -8905,21 +10264,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum8Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum8Collection, 140), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum8Collection, 152), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum8Collection), - (ValueBuffer valueBuffer) => valueBuffer[140]); + (ValueBuffer valueBuffer) => valueBuffer[152]); nullableEnum8Collection.SetPropertyIndexes( - index: 140, - originalValueIndex: 140, + index: 152, + originalValueIndex: 152, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), @@ -8931,14 +10290,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 value) => (short)value, (short value) => (CompiledModelTestBase.Enum8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -8967,6 +10326,117 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (short value) => (CompiledModelTestBase.Enum8)value)))); nullableEnum8Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableEnum8NestedCollection = runtimeEntityType.AddProperty( + "NullableEnum8NestedCollection", + typeof(CompiledModelTestBase.Enum8?[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum8NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableEnum8NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableEnum8NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableEnum8NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableEnum8NestedCollection(instance) == null); + nullableEnum8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableEnum8NestedCollection(entity, value)); + nullableEnum8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableEnum8NestedCollection(entity, value)); + nullableEnum8NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(nullableEnum8NestedCollection, 153), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(nullableEnum8NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[153]); + nullableEnum8NestedCollection.SetPropertyIndexes( + index: 153, + originalValueIndex: 153, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value))), + elementMapping: SqlServerShortTypeMapping.Default.Clone( + comparer: new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + (short v1, short v2) => v1 == v2, + (short v) => (int)v, + (short v) => v), + converter: new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value))))); + nullableEnum8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableEnumU16 = runtimeEntityType.AddProperty( "NullableEnumU16", typeof(CompiledModelTestBase.EnumU16?), @@ -8985,12 +10455,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU16.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU16, 141), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU16, 154), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU16), - (ValueBuffer valueBuffer) => valueBuffer[141]); + (ValueBuffer valueBuffer) => valueBuffer[154]); nullableEnumU16.SetPropertyIndexes( - index: 141, - originalValueIndex: 141, + index: 154, + originalValueIndex: 154, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -9034,21 +10504,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU16Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU16Array, 142), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU16Array, 155), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU16Array), - (ValueBuffer valueBuffer) => valueBuffer[142]); + (ValueBuffer valueBuffer) => valueBuffer[155]); nullableEnumU16Array.SetPropertyIndexes( - index: 142, - originalValueIndex: 142, + index: 155, + originalValueIndex: 155, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), @@ -9060,14 +10530,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 value) => (int)value, (int value) => (CompiledModelTestBase.EnumU16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -9114,12 +10584,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU16AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU16AsString, 143), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU16AsString, 156), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU16AsString), - (ValueBuffer valueBuffer) => valueBuffer[143]); + (ValueBuffer valueBuffer) => valueBuffer[156]); nullableEnumU16AsString.SetPropertyIndexes( - index: 143, - originalValueIndex: 143, + index: 156, + originalValueIndex: 156, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -9163,21 +10633,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU16AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU16AsStringArray, 144), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU16AsStringArray, 157), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[144]); + (ValueBuffer valueBuffer) => valueBuffer[157]); nullableEnumU16AsStringArray.SetPropertyIndexes( - index: 144, - originalValueIndex: 144, + index: 157, + originalValueIndex: 157, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), @@ -9189,14 +10659,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 value) => (int)value, (int value) => (CompiledModelTestBase.EnumU16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -9242,21 +10712,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU16AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU16AsStringCollection, 145), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU16AsStringCollection, 158), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[145]); + (ValueBuffer valueBuffer) => valueBuffer[158]); nullableEnumU16AsStringCollection.SetPropertyIndexes( - index: 145, - originalValueIndex: 145, + index: 158, + originalValueIndex: 158, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), @@ -9268,14 +10738,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 value) => (int)value, (int value) => (CompiledModelTestBase.EnumU16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -9321,21 +10791,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU16Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU16Collection, 146), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU16Collection, 159), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU16Collection), - (ValueBuffer valueBuffer) => valueBuffer[146]); + (ValueBuffer valueBuffer) => valueBuffer[159]); nullableEnumU16Collection.SetPropertyIndexes( - index: 146, - originalValueIndex: 146, + index: 159, + originalValueIndex: 159, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), @@ -9347,14 +10817,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 value) => (int)value, (int value) => (CompiledModelTestBase.EnumU16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -9401,12 +10871,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU32.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU32, 147), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU32, 160), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU32), - (ValueBuffer valueBuffer) => valueBuffer[147]); + (ValueBuffer valueBuffer) => valueBuffer[160]); nullableEnumU32.SetPropertyIndexes( - index: 147, - originalValueIndex: 147, + index: 160, + originalValueIndex: 160, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -9450,21 +10920,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU32Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU32Array, 148), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU32Array, 161), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU32Array), - (ValueBuffer valueBuffer) => valueBuffer[148]); + (ValueBuffer valueBuffer) => valueBuffer[161]); nullableEnumU32Array.SetPropertyIndexes( - index: 148, - originalValueIndex: 148, + index: 161, + originalValueIndex: 161, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), @@ -9476,14 +10946,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 value) => (long)value, (long value) => (CompiledModelTestBase.EnumU32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -9530,12 +11000,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU32AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU32AsString, 149), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU32AsString, 162), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU32AsString), - (ValueBuffer valueBuffer) => valueBuffer[149]); + (ValueBuffer valueBuffer) => valueBuffer[162]); nullableEnumU32AsString.SetPropertyIndexes( - index: 149, - originalValueIndex: 149, + index: 162, + originalValueIndex: 162, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -9579,21 +11049,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU32AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU32AsStringArray, 150), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU32AsStringArray, 163), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[150]); + (ValueBuffer valueBuffer) => valueBuffer[163]); nullableEnumU32AsStringArray.SetPropertyIndexes( - index: 150, - originalValueIndex: 150, + index: 163, + originalValueIndex: 163, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), @@ -9605,14 +11075,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 value) => (long)value, (long value) => (CompiledModelTestBase.EnumU32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -9658,21 +11128,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU32AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU32AsStringCollection, 151), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU32AsStringCollection, 164), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[151]); + (ValueBuffer valueBuffer) => valueBuffer[164]); nullableEnumU32AsStringCollection.SetPropertyIndexes( - index: 151, - originalValueIndex: 151, + index: 164, + originalValueIndex: 164, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), @@ -9684,14 +11154,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 value) => (long)value, (long value) => (CompiledModelTestBase.EnumU32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -9737,21 +11207,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU32Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU32Collection, 152), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU32Collection, 165), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU32Collection), - (ValueBuffer valueBuffer) => valueBuffer[152]); + (ValueBuffer valueBuffer) => valueBuffer[165]); nullableEnumU32Collection.SetPropertyIndexes( - index: 152, - originalValueIndex: 152, + index: 165, + originalValueIndex: 165, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), @@ -9763,14 +11233,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 value) => (long)value, (long value) => (CompiledModelTestBase.EnumU32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -9817,12 +11287,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU64.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU64, 153), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU64, 166), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU64), - (ValueBuffer valueBuffer) => valueBuffer[153]); + (ValueBuffer valueBuffer) => valueBuffer[166]); nullableEnumU64.SetPropertyIndexes( - index: 153, - originalValueIndex: 153, + index: 166, + originalValueIndex: 166, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -9870,21 +11340,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU64Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU64Array, 154), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU64Array, 167), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU64Array), - (ValueBuffer valueBuffer) => valueBuffer[154]); + (ValueBuffer valueBuffer) => valueBuffer[167]); nullableEnumU64Array.SetPropertyIndexes( - index: 154, - originalValueIndex: 154, + index: 167, + originalValueIndex: 167, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), @@ -9896,14 +11366,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -9954,12 +11424,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU64AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU64AsString, 155), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU64AsString, 168), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU64AsString), - (ValueBuffer valueBuffer) => valueBuffer[155]); + (ValueBuffer valueBuffer) => valueBuffer[168]); nullableEnumU64AsString.SetPropertyIndexes( - index: 155, - originalValueIndex: 155, + index: 168, + originalValueIndex: 168, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -10007,21 +11477,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU64AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU64AsStringArray, 156), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU64AsStringArray, 169), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[156]); + (ValueBuffer valueBuffer) => valueBuffer[169]); nullableEnumU64AsStringArray.SetPropertyIndexes( - index: 156, - originalValueIndex: 156, + index: 169, + originalValueIndex: 169, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), @@ -10033,14 +11503,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -10090,21 +11560,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU64AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU64AsStringCollection, 157), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU64AsStringCollection, 170), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[157]); + (ValueBuffer valueBuffer) => valueBuffer[170]); nullableEnumU64AsStringCollection.SetPropertyIndexes( - index: 157, - originalValueIndex: 157, + index: 170, + originalValueIndex: 170, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), @@ -10116,14 +11586,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -10173,21 +11643,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU64Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU64Collection, 158), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU64Collection, 171), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU64Collection), - (ValueBuffer valueBuffer) => valueBuffer[158]); + (ValueBuffer valueBuffer) => valueBuffer[171]); nullableEnumU64Collection.SetPropertyIndexes( - index: 158, - originalValueIndex: 158, + index: 171, + originalValueIndex: 171, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), @@ -10199,14 +11669,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -10239,6 +11709,121 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); nullableEnumU64Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableEnumU64NestedCollection = runtimeEntityType.AddProperty( + "NullableEnumU64NestedCollection", + typeof(CompiledModelTestBase.EnumU64?[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU64NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableEnumU64NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableEnumU64NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableEnumU64NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableEnumU64NestedCollection(instance) == null); + nullableEnumU64NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableEnumU64NestedCollection(entity, value)); + nullableEnumU64NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableEnumU64NestedCollection(entity, value)); + nullableEnumU64NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(nullableEnumU64NestedCollection, 172), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(nullableEnumU64NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[172]); + nullableEnumU64NestedCollection.SetPropertyIndexes( + index: 172, + originalValueIndex: 172, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + elementMapping: SqlServerDecimalTypeMapping.Default.Clone( + comparer: new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + (decimal v1, decimal v2) => v1 == v2, + (decimal v) => v.GetHashCode(), + (decimal v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "decimal(20,0)", + precision: 20, + scale: 0), + converter: new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))); + nullableEnumU64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableEnumU8 = runtimeEntityType.AddProperty( "NullableEnumU8", typeof(CompiledModelTestBase.EnumU8?), @@ -10257,12 +11842,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU8.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU8, 159), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU8, 173), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU8), - (ValueBuffer valueBuffer) => valueBuffer[159]); + (ValueBuffer valueBuffer) => valueBuffer[173]); nullableEnumU8.SetPropertyIndexes( - index: 159, - originalValueIndex: 159, + index: 173, + originalValueIndex: 173, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -10306,21 +11891,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU8Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU8Array, 160), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU8Array, 174), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU8Array), - (ValueBuffer valueBuffer) => valueBuffer[160]); + (ValueBuffer valueBuffer) => valueBuffer[174]); nullableEnumU8Array.SetPropertyIndexes( - index: 160, - originalValueIndex: 160, + index: 174, + originalValueIndex: 174, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), @@ -10332,14 +11917,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 value) => (byte)value, (byte value) => (CompiledModelTestBase.EnumU8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( @@ -10386,12 +11971,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU8AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU8AsString, 161), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU8AsString, 175), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU8AsString), - (ValueBuffer valueBuffer) => valueBuffer[161]); + (ValueBuffer valueBuffer) => valueBuffer[175]); nullableEnumU8AsString.SetPropertyIndexes( - index: 161, - originalValueIndex: 161, + index: 175, + originalValueIndex: 175, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -10435,21 +12020,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU8AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU8AsStringArray, 162), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU8AsStringArray, 176), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[162]); + (ValueBuffer valueBuffer) => valueBuffer[176]); nullableEnumU8AsStringArray.SetPropertyIndexes( - index: 162, - originalValueIndex: 162, + index: 176, + originalValueIndex: 176, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), @@ -10461,14 +12046,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 value) => (byte)value, (byte value) => (CompiledModelTestBase.EnumU8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( @@ -10514,21 +12099,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU8AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU8AsStringCollection, 163), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU8AsStringCollection, 177), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[163]); + (ValueBuffer valueBuffer) => valueBuffer[177]); nullableEnumU8AsStringCollection.SetPropertyIndexes( - index: 163, - originalValueIndex: 163, + index: 177, + originalValueIndex: 177, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), @@ -10540,14 +12125,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 value) => (byte)value, (byte value) => (CompiledModelTestBase.EnumU8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( @@ -10593,21 +12178,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU8Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU8Collection, 164), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU8Collection, 178), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU8Collection), - (ValueBuffer valueBuffer) => valueBuffer[164]); + (ValueBuffer valueBuffer) => valueBuffer[178]); nullableEnumU8Collection.SetPropertyIndexes( - index: 164, - originalValueIndex: 164, + index: 178, + originalValueIndex: 178, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), @@ -10619,14 +12204,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 value) => (byte)value, (byte value) => (CompiledModelTestBase.EnumU8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( @@ -10673,12 +12258,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableFloat.SetAccessors( (InternalEntityEntry entry) => ReadNullableFloat((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableFloat((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableFloat, 165), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableFloat, 179), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableFloat), - (ValueBuffer valueBuffer) => valueBuffer[165]); + (ValueBuffer valueBuffer) => valueBuffer[179]); nullableFloat.SetPropertyIndexes( - index: 165, - originalValueIndex: 165, + index: 179, + originalValueIndex: 179, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -10714,21 +12299,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableFloatArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableFloatArray, 166), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableFloatArray, 180), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableFloatArray), - (ValueBuffer valueBuffer) => valueBuffer[166]); + (ValueBuffer valueBuffer) => valueBuffer[180]); nullableFloatArray.SetPropertyIndexes( - index: 166, - originalValueIndex: 166, + index: 180, + originalValueIndex: 180, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableFloatArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && ((float)v1).Equals((float)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((float)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(float)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && ((float)v1).Equals((float)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((float)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(float)v : default(Nullable))), @@ -10740,10 +12325,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonFloatReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonFloatReaderWriter.Instance), elementMapping: SqlServerFloatTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -10778,12 +12363,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableGuid.SetAccessors( (InternalEntityEntry entry) => ReadNullableGuid((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableGuid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableGuid, 167), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableGuid, 181), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableGuid), - (ValueBuffer valueBuffer) => valueBuffer[167]); + (ValueBuffer valueBuffer) => valueBuffer[181]); nullableGuid.SetPropertyIndexes( - index: 167, - originalValueIndex: 167, + index: 181, + originalValueIndex: 181, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -10821,21 +12406,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableGuidArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableGuidArray, 168), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableGuidArray, 182), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableGuidArray), - (ValueBuffer valueBuffer) => valueBuffer[168]); + (ValueBuffer valueBuffer) => valueBuffer[182]); nullableGuidArray.SetPropertyIndexes( - index: 168, - originalValueIndex: 168, + index: 182, + originalValueIndex: 182, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableGuidArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (Guid)v1 == (Guid)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((Guid)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(Guid)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (Guid)v1 == (Guid)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((Guid)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(Guid)v : default(Nullable))), @@ -10847,10 +12432,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonGuidReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonGuidReaderWriter.Instance), elementMapping: GuidTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -10869,6 +12454,95 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "uniqueidentifier"))); nullableGuidArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableGuidNestedCollection = runtimeEntityType.AddProperty( + "NullableGuidNestedCollection", + typeof(Guid?[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableGuidNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableGuidNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableGuidNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableGuidNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableGuidNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableGuidNestedCollection(instance) == null); + nullableGuidNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableGuidNestedCollection(entity, value)); + nullableGuidNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableGuidNestedCollection(entity, value)); + nullableGuidNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(nullableGuidNestedCollection, 183), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(nullableGuidNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[183]); + nullableGuidNestedCollection.SetPropertyIndexes( + index: 183, + originalValueIndex: 183, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableGuidNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (Guid)v1 == (Guid)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((Guid)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(Guid)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (Guid)v1 == (Guid)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((Guid)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(Guid)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonGuidReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonGuidReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (Guid)v1 == (Guid)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((Guid)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(Guid)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (Guid)v1 == (Guid)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((Guid)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(Guid)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + JsonGuidReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonGuidReaderWriter.Instance), + elementMapping: GuidTypeMapping.Default.Clone( + comparer: new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v), + keyComparer: new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v), + providerValueComparer: new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "uniqueidentifier")))); + nullableGuidNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableIPAddress = runtimeEntityType.AddProperty( "NullableIPAddress", typeof(IPAddress), @@ -10887,12 +12561,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableIPAddress.SetAccessors( (InternalEntityEntry entry) => ReadNullableIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableIPAddress, 169), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableIPAddress, 184), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableIPAddress), - (ValueBuffer valueBuffer) => valueBuffer[169]); + (ValueBuffer valueBuffer) => valueBuffer[184]); nullableIPAddress.SetPropertyIndexes( - index: 169, - originalValueIndex: 169, + index: 184, + originalValueIndex: 184, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -10941,21 +12615,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableIPAddressArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableIPAddressArray, 170), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableIPAddressArray, 185), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableIPAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[170]); + (ValueBuffer valueBuffer) => valueBuffer[185]); nullableIPAddressArray.SetPropertyIndexes( - index: 170, - originalValueIndex: 170, + index: 185, + originalValueIndex: 185, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableIPAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -10967,14 +12641,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -11026,12 +12700,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt16.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt16, 171), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt16, 186), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableInt16), - (ValueBuffer valueBuffer) => valueBuffer[171]); + (ValueBuffer valueBuffer) => valueBuffer[186]); nullableInt16.SetPropertyIndexes( - index: 171, - originalValueIndex: 171, + index: 186, + originalValueIndex: 186, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11067,21 +12741,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt16Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt16Array, 172), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt16Array, 187), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[172]); + (ValueBuffer valueBuffer) => valueBuffer[187]); nullableInt16Array.SetPropertyIndexes( - index: 172, - originalValueIndex: 172, + index: 187, + originalValueIndex: 187, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableInt16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (short)v1 == (short)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(short)v : 0, (Nullable v) => v.HasValue ? (Nullable)(short)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (short)v1 == (short)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(short)v : 0, (Nullable v) => v.HasValue ? (Nullable)(short)v : default(Nullable))), @@ -11093,10 +12767,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonInt16ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -11131,12 +12805,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt32.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt32, 173), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt32, 188), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableInt32), - (ValueBuffer valueBuffer) => valueBuffer[173]); + (ValueBuffer valueBuffer) => valueBuffer[188]); nullableInt32.SetPropertyIndexes( - index: 173, - originalValueIndex: 173, + index: 188, + originalValueIndex: 188, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11172,21 +12846,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt32Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt32Array, 174), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt32Array, 189), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[174]); + (ValueBuffer valueBuffer) => valueBuffer[189]); nullableInt32Array.SetPropertyIndexes( - index: 174, - originalValueIndex: 174, + index: 189, + originalValueIndex: 189, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableInt32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (int)v1 == (int)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)v : 0, (Nullable v) => v.HasValue ? (Nullable)(int)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (int)v1 == (int)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)v : 0, (Nullable v) => v.HasValue ? (Nullable)(int)v : default(Nullable))), @@ -11198,10 +12872,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonInt32ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -11218,6 +12892,93 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (int v) => v))); nullableInt32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableInt32NestedCollection = runtimeEntityType.AddProperty( + "NullableInt32NestedCollection", + typeof(int?[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableInt32NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableInt32NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableInt32NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableInt32NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableInt32NestedCollection(instance) == null); + nullableInt32NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableInt32NestedCollection(entity, value)); + nullableInt32NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableInt32NestedCollection(entity, value)); + nullableInt32NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(nullableInt32NestedCollection, 190), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(nullableInt32NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[190]); + nullableInt32NestedCollection.SetPropertyIndexes( + index: 190, + originalValueIndex: 190, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (int)v1 == (int)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(int)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (int)v1 == (int)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(int)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt32ReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt32ReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (int)v1 == (int)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(int)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (int)v1 == (int)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(int)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + JsonInt32ReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonInt32ReaderWriter.Instance), + elementMapping: IntTypeMapping.Default.Clone( + comparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v), + keyComparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v), + providerValueComparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v)))); + nullableInt32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableInt64 = runtimeEntityType.AddProperty( "NullableInt64", typeof(long?), @@ -11236,12 +12997,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt64.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt64, 175), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt64, 191), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableInt64), - (ValueBuffer valueBuffer) => valueBuffer[175]); + (ValueBuffer valueBuffer) => valueBuffer[191]); nullableInt64.SetPropertyIndexes( - index: 175, - originalValueIndex: 175, + index: 191, + originalValueIndex: 191, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11277,21 +13038,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt64Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt64Array, 176), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt64Array, 192), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[176]); + (ValueBuffer valueBuffer) => valueBuffer[192]); nullableInt64Array.SetPropertyIndexes( - index: 176, - originalValueIndex: 176, + index: 192, + originalValueIndex: 192, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableInt64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable))), @@ -11303,10 +13064,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonInt64ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonInt64ReaderWriter.Instance), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -11323,6 +13084,119 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (long v) => v))); nullableInt64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableInt64NestedCollection = runtimeEntityType.AddProperty( + "NullableInt64NestedCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableInt64NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableInt64NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableInt64NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableInt64NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableInt64NestedCollection(instance) == null); + nullableInt64NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List[][]> value) => WriteNullableInt64NestedCollection(entity, value)); + nullableInt64NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List[][]> value) => WriteNullableInt64NestedCollection(entity, value)); + nullableInt64NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>>(nullableInt64NestedCollection, 193), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>>(nullableInt64NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[193]); + nullableInt64NestedCollection.SetPropertyIndexes( + index: 193, + originalValueIndex: 193, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, long?[][]>(new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable))))), + keyComparer: new ListOfReferenceTypesComparer, long?[][]>(new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable))))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, long?[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, long?[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance), + elementMapping: SqlServerLongTypeMapping.Default.Clone( + comparer: new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v), + keyComparer: new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v), + providerValueComparer: new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v))))); + nullableInt64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableInt8 = runtimeEntityType.AddProperty( "NullableInt8", typeof(sbyte?), @@ -11341,12 +13215,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt8.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt8, 177), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt8, 194), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableInt8), - (ValueBuffer valueBuffer) => valueBuffer[177]); + (ValueBuffer valueBuffer) => valueBuffer[194]); nullableInt8.SetPropertyIndexes( - index: 177, - originalValueIndex: 177, + index: 194, + originalValueIndex: 194, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11390,21 +13264,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt8Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt8Array, 178), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt8Array, 195), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[178]); + (ValueBuffer valueBuffer) => valueBuffer[195]); nullableInt8Array.SetPropertyIndexes( - index: 178, - originalValueIndex: 178, + index: 195, + originalValueIndex: 195, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableInt8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (sbyte)v1 == (sbyte)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(sbyte)v : 0, (Nullable v) => v.HasValue ? (Nullable)(sbyte)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (sbyte)v1 == (sbyte)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(sbyte)v : 0, (Nullable v) => v.HasValue ? (Nullable)(sbyte)v : default(Nullable))), @@ -11416,14 +13290,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (sbyte v) => (short)v, (short v) => (sbyte)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -11470,12 +13344,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullablePhysicalAddress.SetAccessors( (InternalEntityEntry entry) => ReadNullablePhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullablePhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullablePhysicalAddress, 179), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullablePhysicalAddress, 196), (InternalEntityEntry entry) => entry.GetCurrentValue(nullablePhysicalAddress), - (ValueBuffer valueBuffer) => valueBuffer[179]); + (ValueBuffer valueBuffer) => valueBuffer[196]); nullablePhysicalAddress.SetPropertyIndexes( - index: 179, - originalValueIndex: 179, + index: 196, + originalValueIndex: 196, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11524,21 +13398,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullablePhysicalAddressArray.SetAccessors( (InternalEntityEntry entry) => ReadNullablePhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullablePhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullablePhysicalAddressArray, 180), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullablePhysicalAddressArray, 197), (InternalEntityEntry entry) => entry.GetCurrentValue(nullablePhysicalAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[180]); + (ValueBuffer valueBuffer) => valueBuffer[197]); nullablePhysicalAddressArray.SetPropertyIndexes( - index: 180, - originalValueIndex: 180, + index: 197, + originalValueIndex: 197, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullablePhysicalAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), (PhysicalAddress v) => v.GetHashCode(), (PhysicalAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), (PhysicalAddress v) => v.GetHashCode(), (PhysicalAddress v) => v)), @@ -11550,46 +13424,196 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (PhysicalAddress v) => v.ToString(), (string v) => PhysicalAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( - new JsonConvertedValueReaderWriter( - JsonStringReaderWriter.Instance, - new ValueConverter( - (PhysicalAddress v) => v.ToString(), - (string v) => PhysicalAddress.Parse(v)))), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v), + keyComparer: new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(20)", + size: 20, + unicode: true, + dbType: System.Data.DbType.String), + converter: new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v))))); + nullablePhysicalAddressArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + + var nullablePhysicalAddressNestedCollection = runtimeEntityType.AddProperty( + "NullablePhysicalAddressNestedCollection", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullablePhysicalAddressNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullablePhysicalAddressNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullablePhysicalAddressNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullablePhysicalAddressNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullablePhysicalAddressNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullablePhysicalAddressNestedCollection(instance) == null); + nullablePhysicalAddressNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, IEnumerable value) => WriteNullablePhysicalAddressNestedCollection(entity, value)); + nullablePhysicalAddressNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, IEnumerable value) => WriteNullablePhysicalAddressNestedCollection(entity, value)); + nullablePhysicalAddressNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullablePhysicalAddressNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullablePhysicalAddressNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullablePhysicalAddressNestedCollection, 198), + (InternalEntityEntry entry) => entry.GetCurrentValue>(nullablePhysicalAddressNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[198]); + nullablePhysicalAddressNestedCollection.SetPropertyIndexes( + index: 198, + originalValueIndex: 198, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullablePhysicalAddressNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, PhysicalAddress[][]>(new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v)))), + keyComparer: new ListOfReferenceTypesComparer, PhysicalAddress[][]>(new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, PhysicalAddress[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v))))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, PhysicalAddress[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( - comparer: new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), (PhysicalAddress v) => v.GetHashCode(), - (PhysicalAddress v) => v), - keyComparer: new ValueComparer( + (PhysicalAddress v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), (PhysicalAddress v) => v.GetHashCode(), - (PhysicalAddress v) => v), + (PhysicalAddress v) => v))), providerValueComparer: new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v), mappingInfo: new RelationalTypeMappingInfo( - storeTypeName: "nvarchar(20)", - size: 20, + storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new ValueConverter( - (PhysicalAddress v) => v.ToString(), - (string v) => PhysicalAddress.Parse(v)), - jsonValueReaderWriter: new JsonConvertedValueReaderWriter( - JsonStringReaderWriter.Instance, - new ValueConverter( - (PhysicalAddress v) => v.ToString(), - (string v) => PhysicalAddress.Parse(v))))); - nullablePhysicalAddressArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v)))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v))))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v)), + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v), + keyComparer: new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(20)", + size: 20, + unicode: true, + dbType: System.Data.DbType.String), + converter: new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v))))))); + nullablePhysicalAddressNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); var nullableString = runtimeEntityType.AddProperty( "NullableString", @@ -11609,12 +13633,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableString.SetAccessors( (InternalEntityEntry entry) => ReadNullableString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableString, 181), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableString, 199), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableString), - (ValueBuffer valueBuffer) => valueBuffer[181]); + (ValueBuffer valueBuffer) => valueBuffer[199]); nullableString.SetPropertyIndexes( - index: 181, - originalValueIndex: 181, + index: 199, + originalValueIndex: 199, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11655,21 +13679,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableStringArray, 182), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableStringArray, 200), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableStringArray), - (ValueBuffer valueBuffer) => valueBuffer[182]); + (ValueBuffer valueBuffer) => valueBuffer[200]); nullableStringArray.SetPropertyIndexes( - index: 182, - originalValueIndex: 182, + index: 200, + originalValueIndex: 200, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -11681,10 +13705,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -11706,6 +13730,98 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypePostfix: StoreTypePostfix.None)); nullableStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableStringNestedCollection = runtimeEntityType.AddProperty( + "NullableStringNestedCollection", + typeof(string[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableStringNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableStringNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableStringNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableStringNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableStringNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableStringNestedCollection(instance) == null); + nullableStringNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string[][] value) => WriteNullableStringNestedCollection(entity, value)); + nullableStringNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string[][] value) => WriteNullableStringNestedCollection(entity, value)); + nullableStringNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableStringNestedCollection, 201), + (InternalEntityEntry entry) => entry.GetCurrentValue(nullableStringNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[201]); + nullableStringNestedCollection.SetPropertyIndexes( + index: 201, + originalValueIndex: 201, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableStringNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v)), + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + keyComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + storeTypePostfix: StoreTypePostfix.None))); + nullableStringNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableTimeOnly = runtimeEntityType.AddProperty( "NullableTimeOnly", typeof(TimeOnly?), @@ -11724,12 +13840,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableTimeOnly.SetAccessors( (InternalEntityEntry entry) => ReadNullableTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableTimeOnly, 183), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableTimeOnly, 202), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableTimeOnly), - (ValueBuffer valueBuffer) => valueBuffer[183]); + (ValueBuffer valueBuffer) => valueBuffer[202]); nullableTimeOnly.SetPropertyIndexes( - index: 183, - originalValueIndex: 183, + index: 202, + originalValueIndex: 202, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11765,21 +13881,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableTimeOnlyArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableTimeOnlyArray, 184), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableTimeOnlyArray, 203), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableTimeOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[184]); + (ValueBuffer valueBuffer) => valueBuffer[203]); nullableTimeOnlyArray.SetPropertyIndexes( - index: 184, - originalValueIndex: 184, + index: 203, + originalValueIndex: 203, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableTimeOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (TimeOnly)v1 == (TimeOnly)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((TimeOnly)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(TimeOnly)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (TimeOnly)v1 == (TimeOnly)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((TimeOnly)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(TimeOnly)v : default(Nullable))), @@ -11791,10 +13907,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonTimeOnlyReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonTimeOnlyReaderWriter.Instance), elementMapping: SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -11829,12 +13945,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableTimeSpan.SetAccessors( (InternalEntityEntry entry) => ReadNullableTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableTimeSpan, 185), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableTimeSpan, 204), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableTimeSpan), - (ValueBuffer valueBuffer) => valueBuffer[185]); + (ValueBuffer valueBuffer) => valueBuffer[204]); nullableTimeSpan.SetPropertyIndexes( - index: 185, - originalValueIndex: 185, + index: 204, + originalValueIndex: 204, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11870,21 +13986,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableTimeSpanArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableTimeSpanArray, 186), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableTimeSpanArray, 205), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableTimeSpanArray), - (ValueBuffer valueBuffer) => valueBuffer[186]); + (ValueBuffer valueBuffer) => valueBuffer[205]); nullableTimeSpanArray.SetPropertyIndexes( - index: 186, - originalValueIndex: 186, + index: 205, + originalValueIndex: 205, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableTimeSpanArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (TimeSpan)v1 == (TimeSpan)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((TimeSpan)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(TimeSpan)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (TimeSpan)v1 == (TimeSpan)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((TimeSpan)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(TimeSpan)v : default(Nullable))), @@ -11896,10 +14012,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonTimeSpanReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonTimeSpanReaderWriter.Instance), elementMapping: SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -11934,12 +14050,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt16.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt16, 187), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt16, 206), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableUInt16), - (ValueBuffer valueBuffer) => valueBuffer[187]); + (ValueBuffer valueBuffer) => valueBuffer[206]); nullableUInt16.SetPropertyIndexes( - index: 187, - originalValueIndex: 187, + index: 206, + originalValueIndex: 206, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11983,21 +14099,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt16Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt16Array, 188), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt16Array, 207), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableUInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[188]); + (ValueBuffer valueBuffer) => valueBuffer[207]); nullableUInt16Array.SetPropertyIndexes( - index: 188, - originalValueIndex: 188, + index: 207, + originalValueIndex: 207, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableUInt16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (ushort)v1 == (ushort)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(ushort)v : 0, (Nullable v) => v.HasValue ? (Nullable)(ushort)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (ushort)v1 == (ushort)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(ushort)v : 0, (Nullable v) => v.HasValue ? (Nullable)(ushort)v : default(Nullable))), @@ -12009,14 +14125,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (ushort v) => (int)v, (int v) => (ushort)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -12063,12 +14179,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt32.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt32, 189), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt32, 208), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableUInt32), - (ValueBuffer valueBuffer) => valueBuffer[189]); + (ValueBuffer valueBuffer) => valueBuffer[208]); nullableUInt32.SetPropertyIndexes( - index: 189, - originalValueIndex: 189, + index: 208, + originalValueIndex: 208, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12112,21 +14228,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt32Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt32Array, 190), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt32Array, 209), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableUInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[190]); + (ValueBuffer valueBuffer) => valueBuffer[209]); nullableUInt32Array.SetPropertyIndexes( - index: 190, - originalValueIndex: 190, + index: 209, + originalValueIndex: 209, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableUInt32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (uint)v1 == (uint)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(uint)v : 0, (Nullable v) => v.HasValue ? (Nullable)(uint)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (uint)v1 == (uint)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(uint)v : 0, (Nullable v) => v.HasValue ? (Nullable)(uint)v : default(Nullable))), @@ -12138,14 +14254,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (uint v) => (long)v, (long v) => (uint)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -12192,12 +14308,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt64.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt64, 191), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt64, 210), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableUInt64), - (ValueBuffer valueBuffer) => valueBuffer[191]); + (ValueBuffer valueBuffer) => valueBuffer[210]); nullableUInt64.SetPropertyIndexes( - index: 191, - originalValueIndex: 191, + index: 210, + originalValueIndex: 210, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12245,21 +14361,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt64Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt64Array, 192), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt64Array, 211), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableUInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[192]); + (ValueBuffer valueBuffer) => valueBuffer[211]); nullableUInt64Array.SetPropertyIndexes( - index: 192, - originalValueIndex: 192, + index: 211, + originalValueIndex: 211, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableUInt64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (ulong)v1 == (ulong)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((ulong)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(ulong)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (ulong)v1 == (ulong)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((ulong)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(ulong)v : default(Nullable))), @@ -12271,14 +14387,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (ulong v) => (decimal)v, (decimal v) => (ulong)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -12329,12 +14445,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt8.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt8, 193), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt8, 212), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableUInt8), - (ValueBuffer valueBuffer) => valueBuffer[193]); + (ValueBuffer valueBuffer) => valueBuffer[212]); nullableUInt8.SetPropertyIndexes( - index: 193, - originalValueIndex: 193, + index: 212, + originalValueIndex: 212, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12370,21 +14486,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt8Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt8Array, 194), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt8Array, 213), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableUInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[194]); + (ValueBuffer valueBuffer) => valueBuffer[213]); nullableUInt8Array.SetPropertyIndexes( - index: 194, - originalValueIndex: 194, + index: 213, + originalValueIndex: 213, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableUInt8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (byte)v1 == (byte)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(byte)v : 0, (Nullable v) => v.HasValue ? (Nullable)(byte)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (byte)v1 == (byte)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(byte)v : 0, (Nullable v) => v.HasValue ? (Nullable)(byte)v : default(Nullable))), @@ -12396,10 +14512,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -12416,6 +14532,93 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (byte v) => v))); nullableUInt8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableUInt8NestedCollection = runtimeEntityType.AddProperty( + "NullableUInt8NestedCollection", + typeof(byte?[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableUInt8NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableUInt8NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableUInt8NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableUInt8NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableUInt8NestedCollection(instance) == null); + nullableUInt8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableUInt8NestedCollection(entity, value)); + nullableUInt8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableUInt8NestedCollection(entity, value)); + nullableUInt8NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(nullableUInt8NestedCollection, 214), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(nullableUInt8NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[214]); + nullableUInt8NestedCollection.SetPropertyIndexes( + index: 214, + originalValueIndex: 214, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUInt8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (byte)v1 == (byte)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)(byte)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(byte)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (byte)v1 == (byte)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)(byte)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(byte)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonByteReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonByteReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (byte)v1 == (byte)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)(byte)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(byte)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (byte)v1 == (byte)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)(byte)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(byte)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + JsonByteReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonByteReaderWriter.Instance), + elementMapping: SqlServerByteTypeMapping.Default.Clone( + comparer: new ValueComparer( + (byte v1, byte v2) => v1 == v2, + (byte v) => (int)v, + (byte v) => v), + keyComparer: new ValueComparer( + (byte v1, byte v2) => v1 == v2, + (byte v) => (int)v, + (byte v) => v), + providerValueComparer: new ValueComparer( + (byte v1, byte v2) => v1 == v2, + (byte v) => (int)v, + (byte v) => v)))); + nullableUInt8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableUri = runtimeEntityType.AddProperty( "NullableUri", typeof(Uri), @@ -12434,12 +14637,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUri.SetAccessors( (InternalEntityEntry entry) => ReadNullableUri((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUri, 195), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUri, 215), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUri), - (ValueBuffer valueBuffer) => valueBuffer[195]); + (ValueBuffer valueBuffer) => valueBuffer[215]); nullableUri.SetPropertyIndexes( - index: 195, - originalValueIndex: 195, + index: 215, + originalValueIndex: 215, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12488,21 +14691,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUriArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUriArray, 196), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUriArray, 216), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUriArray), - (ValueBuffer valueBuffer) => valueBuffer[196]); + (ValueBuffer valueBuffer) => valueBuffer[216]); nullableUriArray.SetPropertyIndexes( - index: 196, - originalValueIndex: 196, + index: 216, + originalValueIndex: 216, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableUriArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (Uri v1, Uri v2) => v1 == v2, (Uri v) => v.GetHashCode(), (Uri v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (Uri v1, Uri v2) => v1 == v2, (Uri v) => v.GetHashCode(), (Uri v) => v)), @@ -12514,14 +14717,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (Uri v) => v.ToString(), (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -12572,12 +14775,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas physicalAddress.SetAccessors( (InternalEntityEntry entry) => ReadPhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadPhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddress, 197), + (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddress, 217), (InternalEntityEntry entry) => entry.GetCurrentValue(physicalAddress), - (ValueBuffer valueBuffer) => valueBuffer[197]); + (ValueBuffer valueBuffer) => valueBuffer[217]); physicalAddress.SetPropertyIndexes( - index: 197, - originalValueIndex: 197, + index: 217, + originalValueIndex: 217, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12626,21 +14829,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas physicalAddressArray.SetAccessors( (InternalEntityEntry entry) => ReadPhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadPhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressArray, 198), + (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressArray, 218), (InternalEntityEntry entry) => entry.GetCurrentValue(physicalAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[198]); + (ValueBuffer valueBuffer) => valueBuffer[218]); physicalAddressArray.SetPropertyIndexes( - index: 198, - originalValueIndex: 198, + index: 218, + originalValueIndex: 218, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); physicalAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), (PhysicalAddress v) => v.GetHashCode(), (PhysicalAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), (PhysicalAddress v) => v.GetHashCode(), (PhysicalAddress v) => v)), @@ -12652,14 +14855,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (PhysicalAddress v) => v.ToString(), (string v) => PhysicalAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -12711,12 +14914,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas physicalAddressToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadPhysicalAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadPhysicalAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressToBytesConverterProperty, 199), + (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressToBytesConverterProperty, 219), (InternalEntityEntry entry) => entry.GetCurrentValue(physicalAddressToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[199]); + (ValueBuffer valueBuffer) => valueBuffer[219]); physicalAddressToBytesConverterProperty.SetPropertyIndexes( - index: 199, - originalValueIndex: 199, + index: 219, + originalValueIndex: 219, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12764,12 +14967,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas physicalAddressToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadPhysicalAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadPhysicalAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressToStringConverterProperty, 200), + (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressToStringConverterProperty, 220), (InternalEntityEntry entry) => entry.GetCurrentValue(physicalAddressToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[200]); + (ValueBuffer valueBuffer) => valueBuffer[220]); physicalAddressToStringConverterProperty.SetPropertyIndexes( - index: 200, - originalValueIndex: 200, + index: 220, + originalValueIndex: 220, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12818,12 +15021,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas @string.SetAccessors( (InternalEntityEntry entry) => ReadString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(@string, 201), + (InternalEntityEntry entry) => entry.ReadOriginalValue(@string, 221), (InternalEntityEntry entry) => entry.GetCurrentValue(@string), - (ValueBuffer valueBuffer) => valueBuffer[201]); + (ValueBuffer valueBuffer) => valueBuffer[221]); @string.SetPropertyIndexes( - index: 201, - originalValueIndex: 201, + index: 221, + originalValueIndex: 221, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12864,24 +15067,92 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringArray.SetAccessors( (InternalEntityEntry entry) => ReadStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringArray, 202), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringArray, 222), (InternalEntityEntry entry) => entry.GetCurrentValue(stringArray), - (ValueBuffer valueBuffer) => valueBuffer[202]); + (ValueBuffer valueBuffer) => valueBuffer[222]); stringArray.SetPropertyIndexes( - index: 202, - originalValueIndex: 202, + index: 222, + originalValueIndex: 222, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v)), + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + keyComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + storeTypePostfix: StoreTypePostfix.None)); + stringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + + var stringNestedCollection = runtimeEntityType.AddProperty( + "StringNestedCollection", + typeof(string[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + stringNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadStringNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadStringNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadStringNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadStringNestedCollection(instance) == null); + stringNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string[][] value) => WriteStringNestedCollection(entity, value)); + stringNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string[][] value) => WriteStringNestedCollection(entity, value)); + stringNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringNestedCollection, 223), + (InternalEntityEntry entry) => entry.GetCurrentValue(stringNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[223]); + stringNestedCollection.SetPropertyIndexes( + index: 223, + originalValueIndex: 223, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); - stringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + stringNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), - (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + (string v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), - (string v) => v)), + (string v) => v))), providerValueComparer: new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), @@ -12890,20 +15161,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( - JsonStringReaderWriter.Instance)), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( - JsonStringReaderWriter.Instance), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( - comparer: new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), - (string v) => v), - keyComparer: new ValueComparer( + (string v) => v)), + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), - (string v) => v), + (string v) => v)), providerValueComparer: new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), @@ -12912,8 +15185,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - storeTypePostfix: StoreTypePostfix.None)); - stringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + keyComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + storeTypePostfix: StoreTypePostfix.None))); + stringNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); var stringToBoolConverterProperty = runtimeEntityType.AddProperty( "StringToBoolConverterProperty", @@ -12933,12 +15228,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToBoolConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToBoolConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToBoolConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToBoolConverterProperty, 203), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToBoolConverterProperty, 224), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToBoolConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[203]); + (ValueBuffer valueBuffer) => valueBuffer[224]); stringToBoolConverterProperty.SetPropertyIndexes( - index: 203, - originalValueIndex: 203, + index: 224, + originalValueIndex: 224, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12983,12 +15278,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToBytesConverterProperty, 204), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToBytesConverterProperty, 225), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[204]); + (ValueBuffer valueBuffer) => valueBuffer[225]); stringToBytesConverterProperty.SetPropertyIndexes( - index: 204, - originalValueIndex: 204, + index: 225, + originalValueIndex: 225, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13036,12 +15331,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToCharConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToCharConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToCharConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToCharConverterProperty, 205), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToCharConverterProperty, 226), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToCharConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[205]); + (ValueBuffer valueBuffer) => valueBuffer[226]); stringToCharConverterProperty.SetPropertyIndexes( - index: 205, - originalValueIndex: 205, + index: 226, + originalValueIndex: 226, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13091,12 +15386,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToDateOnlyConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToDateOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToDateOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateOnlyConverterProperty, 206), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateOnlyConverterProperty, 227), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDateOnlyConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[206]); + (ValueBuffer valueBuffer) => valueBuffer[227]); stringToDateOnlyConverterProperty.SetPropertyIndexes( - index: 206, - originalValueIndex: 206, + index: 227, + originalValueIndex: 227, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13143,12 +15438,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToDateTimeConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToDateTimeConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToDateTimeConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateTimeConverterProperty, 207), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateTimeConverterProperty, 228), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDateTimeConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[207]); + (ValueBuffer valueBuffer) => valueBuffer[228]); stringToDateTimeConverterProperty.SetPropertyIndexes( - index: 207, - originalValueIndex: 207, + index: 228, + originalValueIndex: 228, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13195,12 +15490,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToDateTimeOffsetConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToDateTimeOffsetConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToDateTimeOffsetConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateTimeOffsetConverterProperty, 208), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateTimeOffsetConverterProperty, 229), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDateTimeOffsetConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[208]); + (ValueBuffer valueBuffer) => valueBuffer[229]); stringToDateTimeOffsetConverterProperty.SetPropertyIndexes( - index: 208, - originalValueIndex: 208, + index: 229, + originalValueIndex: 229, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13247,12 +15542,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToDecimalNumberConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToDecimalNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToDecimalNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDecimalNumberConverterProperty, 209), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDecimalNumberConverterProperty, 230), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDecimalNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[209]); + (ValueBuffer valueBuffer) => valueBuffer[230]); stringToDecimalNumberConverterProperty.SetPropertyIndexes( - index: 209, - originalValueIndex: 209, + index: 230, + originalValueIndex: 230, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13299,12 +15594,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToDoubleNumberConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToDoubleNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToDoubleNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDoubleNumberConverterProperty, 210), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDoubleNumberConverterProperty, 231), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDoubleNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[210]); + (ValueBuffer valueBuffer) => valueBuffer[231]); stringToDoubleNumberConverterProperty.SetPropertyIndexes( - index: 210, - originalValueIndex: 210, + index: 231, + originalValueIndex: 231, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13351,12 +15646,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToEnumConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToEnumConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToEnumConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToEnumConverterProperty, 211), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToEnumConverterProperty, 232), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToEnumConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[211]); + (ValueBuffer valueBuffer) => valueBuffer[232]); stringToEnumConverterProperty.SetPropertyIndexes( - index: 211, - originalValueIndex: 211, + index: 232, + originalValueIndex: 232, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13400,12 +15695,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToGuidConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToGuidConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToGuidConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToGuidConverterProperty, 212), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToGuidConverterProperty, 233), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToGuidConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[212]); + (ValueBuffer valueBuffer) => valueBuffer[233]); stringToGuidConverterProperty.SetPropertyIndexes( - index: 212, - originalValueIndex: 212, + index: 233, + originalValueIndex: 233, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13447,12 +15742,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToIntNumberConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToIntNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToIntNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToIntNumberConverterProperty, 213), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToIntNumberConverterProperty, 234), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToIntNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[213]); + (ValueBuffer valueBuffer) => valueBuffer[234]); stringToIntNumberConverterProperty.SetPropertyIndexes( - index: 213, - originalValueIndex: 213, + index: 234, + originalValueIndex: 234, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13499,12 +15794,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToTimeOnlyConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToTimeOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToTimeOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToTimeOnlyConverterProperty, 214), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToTimeOnlyConverterProperty, 235), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToTimeOnlyConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[214]); + (ValueBuffer valueBuffer) => valueBuffer[235]); stringToTimeOnlyConverterProperty.SetPropertyIndexes( - index: 214, - originalValueIndex: 214, + index: 235, + originalValueIndex: 235, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13551,12 +15846,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToTimeSpanConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToTimeSpanConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToTimeSpanConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToTimeSpanConverterProperty, 215), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToTimeSpanConverterProperty, 236), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToTimeSpanConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[215]); + (ValueBuffer valueBuffer) => valueBuffer[236]); stringToTimeSpanConverterProperty.SetPropertyIndexes( - index: 215, - originalValueIndex: 215, + index: 236, + originalValueIndex: 236, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13603,12 +15898,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToUriConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToUriConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToUriConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToUriConverterProperty, 216), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToUriConverterProperty, 237), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToUriConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[216]); + (ValueBuffer valueBuffer) => valueBuffer[237]); stringToUriConverterProperty.SetPropertyIndexes( - index: 216, - originalValueIndex: 216, + index: 237, + originalValueIndex: 237, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13658,12 +15953,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeOnly.SetAccessors( (InternalEntityEntry entry) => ReadTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnly, 217), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnly, 238), (InternalEntityEntry entry) => entry.GetCurrentValue(timeOnly), - (ValueBuffer valueBuffer) => valueBuffer[217]); + (ValueBuffer valueBuffer) => valueBuffer[238]); timeOnly.SetPropertyIndexes( - index: 217, - originalValueIndex: 217, + index: 238, + originalValueIndex: 238, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13699,21 +15994,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeOnlyArray.SetAccessors( (InternalEntityEntry entry) => ReadTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyArray, 218), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyArray, 239), (InternalEntityEntry entry) => entry.GetCurrentValue(timeOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[218]); + (ValueBuffer valueBuffer) => valueBuffer[239]); timeOnlyArray.SetPropertyIndexes( - index: 218, - originalValueIndex: 218, + index: 239, + originalValueIndex: 239, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); timeOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), (TimeOnly v) => v.GetHashCode(), (TimeOnly v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), (TimeOnly v) => v.GetHashCode(), (TimeOnly v) => v)), @@ -13725,10 +16020,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonTimeOnlyReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonTimeOnlyReaderWriter.Instance), elementMapping: SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -13763,12 +16058,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeOnlyToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadTimeOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyToStringConverterProperty, 219), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyToStringConverterProperty, 240), (InternalEntityEntry entry) => entry.GetCurrentValue(timeOnlyToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[219]); + (ValueBuffer valueBuffer) => valueBuffer[240]); timeOnlyToStringConverterProperty.SetPropertyIndexes( - index: 219, - originalValueIndex: 219, + index: 240, + originalValueIndex: 240, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13819,12 +16114,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeOnlyToTicksConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadTimeOnlyToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeOnlyToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyToTicksConverterProperty, 220), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyToTicksConverterProperty, 241), (InternalEntityEntry entry) => entry.GetCurrentValue(timeOnlyToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[220]); + (ValueBuffer valueBuffer) => valueBuffer[241]); timeOnlyToTicksConverterProperty.SetPropertyIndexes( - index: 220, - originalValueIndex: 220, + index: 241, + originalValueIndex: 241, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13870,12 +16165,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeSpan.SetAccessors( (InternalEntityEntry entry) => ReadTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpan, 221), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpan, 242), (InternalEntityEntry entry) => entry.GetCurrentValue(timeSpan), - (ValueBuffer valueBuffer) => valueBuffer[221]); + (ValueBuffer valueBuffer) => valueBuffer[242]); timeSpan.SetPropertyIndexes( - index: 221, - originalValueIndex: 221, + index: 242, + originalValueIndex: 242, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13911,21 +16206,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeSpanArray.SetAccessors( (InternalEntityEntry entry) => ReadTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanArray, 222), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanArray, 243), (InternalEntityEntry entry) => entry.GetCurrentValue(timeSpanArray), - (ValueBuffer valueBuffer) => valueBuffer[222]); + (ValueBuffer valueBuffer) => valueBuffer[243]); timeSpanArray.SetPropertyIndexes( - index: 222, - originalValueIndex: 222, + index: 243, + originalValueIndex: 243, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); timeSpanArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), (TimeSpan v) => v.GetHashCode(), (TimeSpan v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), (TimeSpan v) => v.GetHashCode(), (TimeSpan v) => v)), @@ -13937,10 +16232,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonTimeSpanReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonTimeSpanReaderWriter.Instance), elementMapping: SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -13975,12 +16270,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeSpanToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadTimeSpanToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeSpanToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanToStringConverterProperty, 223), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanToStringConverterProperty, 244), (InternalEntityEntry entry) => entry.GetCurrentValue(timeSpanToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[223]); + (ValueBuffer valueBuffer) => valueBuffer[244]); timeSpanToStringConverterProperty.SetPropertyIndexes( - index: 223, - originalValueIndex: 223, + index: 244, + originalValueIndex: 244, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14031,12 +16326,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeSpanToTicksConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadTimeSpanToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeSpanToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanToTicksConverterProperty, 224), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanToTicksConverterProperty, 245), (InternalEntityEntry entry) => entry.GetCurrentValue(timeSpanToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[224]); + (ValueBuffer valueBuffer) => valueBuffer[245]); timeSpanToTicksConverterProperty.SetPropertyIndexes( - index: 224, - originalValueIndex: 224, + index: 245, + originalValueIndex: 245, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14081,12 +16376,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt16.SetAccessors( (InternalEntityEntry entry) => ReadUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt16, 225), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt16, 246), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt16), - (ValueBuffer valueBuffer) => valueBuffer[225]); + (ValueBuffer valueBuffer) => valueBuffer[246]); uInt16.SetPropertyIndexes( - index: 225, - originalValueIndex: 225, + index: 246, + originalValueIndex: 246, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14131,21 +16426,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt16Array.SetAccessors( (InternalEntityEntry entry) => ReadUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt16Array, 226), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt16Array, 247), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[226]); + (ValueBuffer valueBuffer) => valueBuffer[247]); uInt16Array.SetPropertyIndexes( - index: 226, - originalValueIndex: 226, + index: 247, + originalValueIndex: 247, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); uInt16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (ushort v1, ushort v2) => v1 == v2, (ushort v) => (int)v, (ushort v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (ushort v1, ushort v2) => v1 == v2, (ushort v) => (int)v, (ushort v) => v)), @@ -14157,14 +16452,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (ushort v) => (int)v, (int v) => (ushort)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -14210,12 +16505,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt32.SetAccessors( (InternalEntityEntry entry) => ReadUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt32, 227), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt32, 248), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt32), - (ValueBuffer valueBuffer) => valueBuffer[227]); + (ValueBuffer valueBuffer) => valueBuffer[248]); uInt32.SetPropertyIndexes( - index: 227, - originalValueIndex: 227, + index: 248, + originalValueIndex: 248, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14260,21 +16555,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt32Array.SetAccessors( (InternalEntityEntry entry) => ReadUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt32Array, 228), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt32Array, 249), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[228]); + (ValueBuffer valueBuffer) => valueBuffer[249]); uInt32Array.SetPropertyIndexes( - index: 228, - originalValueIndex: 228, + index: 249, + originalValueIndex: 249, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); uInt32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (uint v1, uint v2) => v1 == v2, (uint v) => (int)v, (uint v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (uint v1, uint v2) => v1 == v2, (uint v) => (int)v, (uint v) => v)), @@ -14286,14 +16581,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (uint v) => (long)v, (long v) => (uint)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -14339,12 +16634,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt64.SetAccessors( (InternalEntityEntry entry) => ReadUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt64, 229), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt64, 250), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt64), - (ValueBuffer valueBuffer) => valueBuffer[229]); + (ValueBuffer valueBuffer) => valueBuffer[250]); uInt64.SetPropertyIndexes( - index: 229, - originalValueIndex: 229, + index: 250, + originalValueIndex: 250, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14393,21 +16688,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt64Array.SetAccessors( (InternalEntityEntry entry) => ReadUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt64Array, 230), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt64Array, 251), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[230]); + (ValueBuffer valueBuffer) => valueBuffer[251]); uInt64Array.SetPropertyIndexes( - index: 230, - originalValueIndex: 230, + index: 251, + originalValueIndex: 251, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); uInt64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (ulong v1, ulong v2) => v1 == v2, (ulong v) => v.GetHashCode(), (ulong v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (ulong v1, ulong v2) => v1 == v2, (ulong v) => v.GetHashCode(), (ulong v) => v)), @@ -14419,14 +16714,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (ulong v) => (decimal)v, (decimal v) => (ulong)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -14477,12 +16772,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt8.SetAccessors( (InternalEntityEntry entry) => ReadUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt8, 231), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt8, 252), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt8), - (ValueBuffer valueBuffer) => valueBuffer[231]); + (ValueBuffer valueBuffer) => valueBuffer[252]); uInt8.SetPropertyIndexes( - index: 231, - originalValueIndex: 231, + index: 252, + originalValueIndex: 252, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14518,12 +16813,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt8Array.SetAccessors( (InternalEntityEntry entry) => ReadUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt8Array, 232), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt8Array, 253), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[232]); + (ValueBuffer valueBuffer) => valueBuffer[253]); uInt8Array.SetPropertyIndexes( - index: 232, - originalValueIndex: 232, + index: 253, + originalValueIndex: 253, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14545,6 +16840,72 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypePostfix: StoreTypePostfix.None); uInt8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var uInt8NestedCollection = runtimeEntityType.AddProperty( + "UInt8NestedCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + uInt8NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadUInt8NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadUInt8NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadUInt8NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadUInt8NestedCollection(instance) == null); + uInt8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => WriteUInt8NestedCollection(entity, value)); + uInt8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => WriteUInt8NestedCollection(entity, value)); + uInt8NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(uInt8NestedCollection, 254), + (InternalEntityEntry entry) => entry.GetCurrentValue>(uInt8NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[254]); + uInt8NestedCollection.SetPropertyIndexes( + index: 254, + originalValueIndex: 254, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uInt8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, byte[]>(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v)), + keyComparer: new ListOfReferenceTypesComparer, byte[]>(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, byte[]>( + JsonByteArrayReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, byte[]>( + JsonByteArrayReaderWriter.Instance), + elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( + comparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v), + keyComparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), + (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), + (byte[] source) => source.ToArray()), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "varbinary(max)"), + storeTypePostfix: StoreTypePostfix.None)); + uInt8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var uri = runtimeEntityType.AddProperty( "Uri", typeof(Uri), @@ -14562,12 +16923,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uri.SetAccessors( (InternalEntityEntry entry) => ReadUri((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uri, 233), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uri, 255), (InternalEntityEntry entry) => entry.GetCurrentValue(uri), - (ValueBuffer valueBuffer) => valueBuffer[233]); + (ValueBuffer valueBuffer) => valueBuffer[255]); uri.SetPropertyIndexes( - index: 233, - originalValueIndex: 233, + index: 255, + originalValueIndex: 255, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14616,21 +16977,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uriArray.SetAccessors( (InternalEntityEntry entry) => ReadUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uriArray, 234), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uriArray, 256), (InternalEntityEntry entry) => entry.GetCurrentValue(uriArray), - (ValueBuffer valueBuffer) => valueBuffer[234]); + (ValueBuffer valueBuffer) => valueBuffer[256]); uriArray.SetPropertyIndexes( - index: 234, - originalValueIndex: 234, + index: 256, + originalValueIndex: 256, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); uriArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (Uri v1, Uri v2) => v1 == v2, (Uri v) => v.GetHashCode(), (Uri v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (Uri v1, Uri v2) => v1 == v2, (Uri v) => v.GetHashCode(), (Uri v) => v)), @@ -14642,14 +17003,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (Uri v) => v.ToString(), (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -14701,12 +17062,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uriToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadUriToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUriToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uriToStringConverterProperty, 235), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uriToStringConverterProperty, 257), (InternalEntityEntry entry) => entry.GetCurrentValue(uriToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[235]); + (ValueBuffer valueBuffer) => valueBuffer[257]); uriToStringConverterProperty.SetPropertyIndexes( - index: 235, - originalValueIndex: 235, + index: 257, + originalValueIndex: 257, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14750,15 +17111,18 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var id = runtimeEntityType.FindProperty("Id")!; var @bool = runtimeEntityType.FindProperty("Bool")!; var boolArray = runtimeEntityType.FindProperty("BoolArray")!; + var boolNestedCollection = runtimeEntityType.FindProperty("BoolNestedCollection")!; var boolToStringConverterProperty = runtimeEntityType.FindProperty("BoolToStringConverterProperty")!; var boolToTwoValuesConverterProperty = runtimeEntityType.FindProperty("BoolToTwoValuesConverterProperty")!; var boolToZeroOneConverterProperty = runtimeEntityType.FindProperty("BoolToZeroOneConverterProperty")!; var bytes = runtimeEntityType.FindProperty("Bytes")!; var bytesArray = runtimeEntityType.FindProperty("BytesArray")!; + var bytesNestedCollection = runtimeEntityType.FindProperty("BytesNestedCollection")!; var bytesToStringConverterProperty = runtimeEntityType.FindProperty("BytesToStringConverterProperty")!; var castingConverterProperty = runtimeEntityType.FindProperty("CastingConverterProperty")!; var @char = runtimeEntityType.FindProperty("Char")!; var charArray = runtimeEntityType.FindProperty("CharArray")!; + var charNestedCollection = runtimeEntityType.FindProperty("CharNestedCollection")!; var charToStringConverterProperty = runtimeEntityType.FindProperty("CharToStringConverterProperty")!; var dateOnly = runtimeEntityType.FindProperty("DateOnly")!; var dateOnlyArray = runtimeEntityType.FindProperty("DateOnlyArray")!; @@ -14791,6 +17155,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var enum32AsStringArray = runtimeEntityType.FindProperty("Enum32AsStringArray")!; var enum32AsStringCollection = runtimeEntityType.FindProperty("Enum32AsStringCollection")!; var enum32Collection = runtimeEntityType.FindProperty("Enum32Collection")!; + var enum32NestedCollection = runtimeEntityType.FindProperty("Enum32NestedCollection")!; var enum64 = runtimeEntityType.FindProperty("Enum64")!; var enum64Array = runtimeEntityType.FindProperty("Enum64Array")!; var enum64AsString = runtimeEntityType.FindProperty("Enum64AsString")!; @@ -14803,6 +17168,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var enum8AsStringArray = runtimeEntityType.FindProperty("Enum8AsStringArray")!; var enum8AsStringCollection = runtimeEntityType.FindProperty("Enum8AsStringCollection")!; var enum8Collection = runtimeEntityType.FindProperty("Enum8Collection")!; + var enum8NestedCollection = runtimeEntityType.FindProperty("Enum8NestedCollection")!; var enumToNumberConverterProperty = runtimeEntityType.FindProperty("EnumToNumberConverterProperty")!; var enumToStringConverterProperty = runtimeEntityType.FindProperty("EnumToStringConverterProperty")!; var enumU16 = runtimeEntityType.FindProperty("EnumU16")!; @@ -14823,6 +17189,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var enumU64AsStringArray = runtimeEntityType.FindProperty("EnumU64AsStringArray")!; var enumU64AsStringCollection = runtimeEntityType.FindProperty("EnumU64AsStringCollection")!; var enumU64Collection = runtimeEntityType.FindProperty("EnumU64Collection")!; + var enumU64NestedCollection = runtimeEntityType.FindProperty("EnumU64NestedCollection")!; var enumU8 = runtimeEntityType.FindProperty("EnumU8")!; var enumU8Array = runtimeEntityType.FindProperty("EnumU8Array")!; var enumU8AsString = runtimeEntityType.FindProperty("EnumU8AsString")!; @@ -14833,6 +17200,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var floatArray = runtimeEntityType.FindProperty("FloatArray")!; var guid = runtimeEntityType.FindProperty("Guid")!; var guidArray = runtimeEntityType.FindProperty("GuidArray")!; + var guidNestedCollection = runtimeEntityType.FindProperty("GuidNestedCollection")!; var guidToBytesConverterProperty = runtimeEntityType.FindProperty("GuidToBytesConverterProperty")!; var guidToStringConverterProperty = runtimeEntityType.FindProperty("GuidToStringConverterProperty")!; var iPAddress = runtimeEntityType.FindProperty("IPAddress")!; @@ -14843,10 +17211,13 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var int16Array = runtimeEntityType.FindProperty("Int16Array")!; var int32 = runtimeEntityType.FindProperty("Int32")!; var int32Array = runtimeEntityType.FindProperty("Int32Array")!; + var int32NestedCollection = runtimeEntityType.FindProperty("Int32NestedCollection")!; var int64 = runtimeEntityType.FindProperty("Int64")!; var int64Array = runtimeEntityType.FindProperty("Int64Array")!; + var int64NestedCollection = runtimeEntityType.FindProperty("Int64NestedCollection")!; var int8 = runtimeEntityType.FindProperty("Int8")!; var int8Array = runtimeEntityType.FindProperty("Int8Array")!; + var int8NestedCollection = runtimeEntityType.FindProperty("Int8NestedCollection")!; var intNumberToBytesConverterProperty = runtimeEntityType.FindProperty("IntNumberToBytesConverterProperty")!; var intNumberToStringConverterProperty = runtimeEntityType.FindProperty("IntNumberToStringConverterProperty")!; var nullIntToNullStringConverterProperty = runtimeEntityType.FindProperty("NullIntToNullStringConverterProperty")!; @@ -14854,6 +17225,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var nullableBoolArray = runtimeEntityType.FindProperty("NullableBoolArray")!; var nullableBytes = runtimeEntityType.FindProperty("NullableBytes")!; var nullableBytesArray = runtimeEntityType.FindProperty("NullableBytesArray")!; + var nullableBytesNestedCollection = runtimeEntityType.FindProperty("NullableBytesNestedCollection")!; var nullableChar = runtimeEntityType.FindProperty("NullableChar")!; var nullableCharArray = runtimeEntityType.FindProperty("NullableCharArray")!; var nullableDateOnly = runtimeEntityType.FindProperty("NullableDateOnly")!; @@ -14876,6 +17248,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var nullableEnum32AsStringArray = runtimeEntityType.FindProperty("NullableEnum32AsStringArray")!; var nullableEnum32AsStringCollection = runtimeEntityType.FindProperty("NullableEnum32AsStringCollection")!; var nullableEnum32Collection = runtimeEntityType.FindProperty("NullableEnum32Collection")!; + var nullableEnum32NestedCollection = runtimeEntityType.FindProperty("NullableEnum32NestedCollection")!; var nullableEnum64 = runtimeEntityType.FindProperty("NullableEnum64")!; var nullableEnum64Array = runtimeEntityType.FindProperty("NullableEnum64Array")!; var nullableEnum64AsString = runtimeEntityType.FindProperty("NullableEnum64AsString")!; @@ -14888,6 +17261,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var nullableEnum8AsStringArray = runtimeEntityType.FindProperty("NullableEnum8AsStringArray")!; var nullableEnum8AsStringCollection = runtimeEntityType.FindProperty("NullableEnum8AsStringCollection")!; var nullableEnum8Collection = runtimeEntityType.FindProperty("NullableEnum8Collection")!; + var nullableEnum8NestedCollection = runtimeEntityType.FindProperty("NullableEnum8NestedCollection")!; var nullableEnumU16 = runtimeEntityType.FindProperty("NullableEnumU16")!; var nullableEnumU16Array = runtimeEntityType.FindProperty("NullableEnumU16Array")!; var nullableEnumU16AsString = runtimeEntityType.FindProperty("NullableEnumU16AsString")!; @@ -14906,6 +17280,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var nullableEnumU64AsStringArray = runtimeEntityType.FindProperty("NullableEnumU64AsStringArray")!; var nullableEnumU64AsStringCollection = runtimeEntityType.FindProperty("NullableEnumU64AsStringCollection")!; var nullableEnumU64Collection = runtimeEntityType.FindProperty("NullableEnumU64Collection")!; + var nullableEnumU64NestedCollection = runtimeEntityType.FindProperty("NullableEnumU64NestedCollection")!; var nullableEnumU8 = runtimeEntityType.FindProperty("NullableEnumU8")!; var nullableEnumU8Array = runtimeEntityType.FindProperty("NullableEnumU8Array")!; var nullableEnumU8AsString = runtimeEntityType.FindProperty("NullableEnumU8AsString")!; @@ -14916,20 +17291,25 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var nullableFloatArray = runtimeEntityType.FindProperty("NullableFloatArray")!; var nullableGuid = runtimeEntityType.FindProperty("NullableGuid")!; var nullableGuidArray = runtimeEntityType.FindProperty("NullableGuidArray")!; + var nullableGuidNestedCollection = runtimeEntityType.FindProperty("NullableGuidNestedCollection")!; var nullableIPAddress = runtimeEntityType.FindProperty("NullableIPAddress")!; var nullableIPAddressArray = runtimeEntityType.FindProperty("NullableIPAddressArray")!; var nullableInt16 = runtimeEntityType.FindProperty("NullableInt16")!; var nullableInt16Array = runtimeEntityType.FindProperty("NullableInt16Array")!; var nullableInt32 = runtimeEntityType.FindProperty("NullableInt32")!; var nullableInt32Array = runtimeEntityType.FindProperty("NullableInt32Array")!; + var nullableInt32NestedCollection = runtimeEntityType.FindProperty("NullableInt32NestedCollection")!; var nullableInt64 = runtimeEntityType.FindProperty("NullableInt64")!; var nullableInt64Array = runtimeEntityType.FindProperty("NullableInt64Array")!; + var nullableInt64NestedCollection = runtimeEntityType.FindProperty("NullableInt64NestedCollection")!; var nullableInt8 = runtimeEntityType.FindProperty("NullableInt8")!; var nullableInt8Array = runtimeEntityType.FindProperty("NullableInt8Array")!; var nullablePhysicalAddress = runtimeEntityType.FindProperty("NullablePhysicalAddress")!; var nullablePhysicalAddressArray = runtimeEntityType.FindProperty("NullablePhysicalAddressArray")!; + var nullablePhysicalAddressNestedCollection = runtimeEntityType.FindProperty("NullablePhysicalAddressNestedCollection")!; var nullableString = runtimeEntityType.FindProperty("NullableString")!; var nullableStringArray = runtimeEntityType.FindProperty("NullableStringArray")!; + var nullableStringNestedCollection = runtimeEntityType.FindProperty("NullableStringNestedCollection")!; var nullableTimeOnly = runtimeEntityType.FindProperty("NullableTimeOnly")!; var nullableTimeOnlyArray = runtimeEntityType.FindProperty("NullableTimeOnlyArray")!; var nullableTimeSpan = runtimeEntityType.FindProperty("NullableTimeSpan")!; @@ -14942,6 +17322,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var nullableUInt64Array = runtimeEntityType.FindProperty("NullableUInt64Array")!; var nullableUInt8 = runtimeEntityType.FindProperty("NullableUInt8")!; var nullableUInt8Array = runtimeEntityType.FindProperty("NullableUInt8Array")!; + var nullableUInt8NestedCollection = runtimeEntityType.FindProperty("NullableUInt8NestedCollection")!; var nullableUri = runtimeEntityType.FindProperty("NullableUri")!; var nullableUriArray = runtimeEntityType.FindProperty("NullableUriArray")!; var physicalAddress = runtimeEntityType.FindProperty("PhysicalAddress")!; @@ -14950,6 +17331,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var physicalAddressToStringConverterProperty = runtimeEntityType.FindProperty("PhysicalAddressToStringConverterProperty")!; var @string = runtimeEntityType.FindProperty("String")!; var stringArray = runtimeEntityType.FindProperty("StringArray")!; + var stringNestedCollection = runtimeEntityType.FindProperty("StringNestedCollection")!; var stringToBoolConverterProperty = runtimeEntityType.FindProperty("StringToBoolConverterProperty")!; var stringToBytesConverterProperty = runtimeEntityType.FindProperty("StringToBytesConverterProperty")!; var stringToCharConverterProperty = runtimeEntityType.FindProperty("StringToCharConverterProperty")!; @@ -14980,6 +17362,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var uInt64Array = runtimeEntityType.FindProperty("UInt64Array")!; var uInt8 = runtimeEntityType.FindProperty("UInt8")!; var uInt8Array = runtimeEntityType.FindProperty("UInt8Array")!; + var uInt8NestedCollection = runtimeEntityType.FindProperty("UInt8NestedCollection")!; var uri = runtimeEntityType.FindProperty("Uri")!; var uriArray = runtimeEntityType.FindProperty("UriArray")!; var uriToStringConverterProperty = runtimeEntityType.FindProperty("UriToStringConverterProperty")!; @@ -14987,21 +17370,23 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) (InternalEntityEntry source) => { var entity = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg = (ISnapshot)new Snapshot(((ValueComparer)id.GetValueComparer()).Snapshot(source.GetCurrentValue(id)), ((ValueComparer)@bool.GetValueComparer()).Snapshot(source.GetCurrentValue(@bool)), (IEnumerable)source.GetCurrentValue(boolArray) == null ? null : (bool[])((ValueComparer>)boolArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(boolArray)), ((ValueComparer)boolToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(boolToStringConverterProperty)), ((ValueComparer)boolToTwoValuesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(boolToTwoValuesConverterProperty)), ((ValueComparer)boolToZeroOneConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(boolToZeroOneConverterProperty)), source.GetCurrentValue(bytes) == null ? null : ((ValueComparer)bytes.GetValueComparer()).Snapshot(source.GetCurrentValue(bytes)), (IEnumerable)source.GetCurrentValue(bytesArray) == null ? null : (byte[][])((ValueComparer>)bytesArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(bytesArray)), source.GetCurrentValue(bytesToStringConverterProperty) == null ? null : ((ValueComparer)bytesToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(bytesToStringConverterProperty)), ((ValueComparer)castingConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(castingConverterProperty)), ((ValueComparer)@char.GetValueComparer()).Snapshot(source.GetCurrentValue(@char)), (IEnumerable)source.GetCurrentValue(charArray) == null ? null : (char[])((ValueComparer>)charArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(charArray)), ((ValueComparer)charToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(charToStringConverterProperty)), ((ValueComparer)dateOnly.GetValueComparer()).Snapshot(source.GetCurrentValue(dateOnly)), (IEnumerable)source.GetCurrentValue(dateOnlyArray) == null ? null : (DateOnly[])((ValueComparer>)dateOnlyArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(dateOnlyArray)), ((ValueComparer)dateOnlyToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateOnlyToStringConverterProperty)), ((ValueComparer)dateTime.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTime)), (IEnumerable)source.GetCurrentValue(dateTimeArray) == null ? null : (DateTime[])((ValueComparer>)dateTimeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(dateTimeArray)), ((ValueComparer)dateTimeOffsetToBinaryConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer)dateTimeOffsetToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer)dateTimeOffsetToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeOffsetToStringConverterProperty)), ((ValueComparer)dateTimeToBinaryConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeToBinaryConverterProperty)), ((ValueComparer)dateTimeToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeToStringConverterProperty)), ((ValueComparer)dateTimeToTicksConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeToTicksConverterProperty)), ((ValueComparer)@decimal.GetValueComparer()).Snapshot(source.GetCurrentValue(@decimal)), (IEnumerable)source.GetCurrentValue(decimalArray) == null ? null : (decimal[])((ValueComparer>)decimalArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(decimalArray)), ((ValueComparer)decimalNumberToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(decimalNumberToBytesConverterProperty)), ((ValueComparer)decimalNumberToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(decimalNumberToStringConverterProperty)), ((ValueComparer)@double.GetValueComparer()).Snapshot(source.GetCurrentValue(@double)), (IEnumerable)source.GetCurrentValue(doubleArray) == null ? null : (double[])((ValueComparer>)doubleArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(doubleArray))); + var liftedArg = (ISnapshot)new Snapshot(((ValueComparer)id.GetValueComparer()).Snapshot(source.GetCurrentValue(id)), ((ValueComparer)@bool.GetValueComparer()).Snapshot(source.GetCurrentValue(@bool)), (IEnumerable)source.GetCurrentValue(boolArray) == null ? null : (bool[])((ValueComparer>)boolArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(boolArray)), (object)source.GetCurrentValue(boolNestedCollection) == null ? null : (bool[][])((ValueComparer)boolNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(boolNestedCollection)), ((ValueComparer)boolToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(boolToStringConverterProperty)), ((ValueComparer)boolToTwoValuesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(boolToTwoValuesConverterProperty)), ((ValueComparer)boolToZeroOneConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(boolToZeroOneConverterProperty)), source.GetCurrentValue(bytes) == null ? null : ((ValueComparer)bytes.GetValueComparer()).Snapshot(source.GetCurrentValue(bytes)), (object)source.GetCurrentValue(bytesArray) == null ? null : (byte[][])((ValueComparer)bytesArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(bytesArray)), (object)source.GetCurrentValue(bytesNestedCollection) == null ? null : (byte[][][])((ValueComparer)bytesNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(bytesNestedCollection)), source.GetCurrentValue(bytesToStringConverterProperty) == null ? null : ((ValueComparer)bytesToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(bytesToStringConverterProperty)), ((ValueComparer)castingConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(castingConverterProperty)), ((ValueComparer)@char.GetValueComparer()).Snapshot(source.GetCurrentValue(@char)), (IEnumerable)source.GetCurrentValue(charArray) == null ? null : (char[])((ValueComparer>)charArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(charArray)), (object)source.GetCurrentValue(charNestedCollection) == null ? null : (char[][])((ValueComparer)charNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(charNestedCollection)), ((ValueComparer)charToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(charToStringConverterProperty)), ((ValueComparer)dateOnly.GetValueComparer()).Snapshot(source.GetCurrentValue(dateOnly)), (IEnumerable)source.GetCurrentValue(dateOnlyArray) == null ? null : (DateOnly[])((ValueComparer>)dateOnlyArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(dateOnlyArray)), ((ValueComparer)dateOnlyToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateOnlyToStringConverterProperty)), ((ValueComparer)dateTime.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTime)), (IEnumerable)source.GetCurrentValue(dateTimeArray) == null ? null : (DateTime[])((ValueComparer>)dateTimeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(dateTimeArray)), ((ValueComparer)dateTimeOffsetToBinaryConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer)dateTimeOffsetToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer)dateTimeOffsetToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeOffsetToStringConverterProperty)), ((ValueComparer)dateTimeToBinaryConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeToBinaryConverterProperty)), ((ValueComparer)dateTimeToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeToStringConverterProperty)), ((ValueComparer)dateTimeToTicksConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeToTicksConverterProperty)), ((ValueComparer)@decimal.GetValueComparer()).Snapshot(source.GetCurrentValue(@decimal)), (IEnumerable)source.GetCurrentValue(decimalArray) == null ? null : (decimal[])((ValueComparer>)decimalArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(decimalArray)), ((ValueComparer)decimalNumberToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(decimalNumberToBytesConverterProperty))); var entity0 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg0 = (ISnapshot)new Snapshot, List, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], List, List, CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List, List, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List, List, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32, CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[]>(((ValueComparer)doubleNumberToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(doubleNumberToBytesConverterProperty)), ((ValueComparer)doubleNumberToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(doubleNumberToStringConverterProperty)), ((ValueComparer)enum16.GetValueComparer()).Snapshot(source.GetCurrentValue(enum16)), (IEnumerable)source.GetCurrentValue(enum16Array) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer>)enum16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum16Array)), ((ValueComparer)enum16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum16AsString)), (IEnumerable)source.GetCurrentValue(enum16AsStringArray) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer>)enum16AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum16AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum16AsStringCollection) == null ? null : (List)((ValueComparer>)enum16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum16AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum16Collection) == null ? null : (List)((ValueComparer>)enum16Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum16Collection)), ((ValueComparer)enum32.GetValueComparer()).Snapshot(source.GetCurrentValue(enum32)), (IEnumerable)source.GetCurrentValue(enum32Array) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer>)enum32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum32Array)), ((ValueComparer)enum32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum32AsString)), (IEnumerable)source.GetCurrentValue(enum32AsStringArray) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer>)enum32AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum32AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum32AsStringCollection) == null ? null : (List)((ValueComparer>)enum32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum32AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum32Collection) == null ? null : (List)((ValueComparer>)enum32Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum32Collection)), ((ValueComparer)enum64.GetValueComparer()).Snapshot(source.GetCurrentValue(enum64)), (IEnumerable)source.GetCurrentValue(enum64Array) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer>)enum64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum64Array)), ((ValueComparer)enum64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum64AsString)), (IEnumerable)source.GetCurrentValue(enum64AsStringArray) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer>)enum64AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum64AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum64AsStringCollection) == null ? null : (List)((ValueComparer>)enum64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum64AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum64Collection) == null ? null : (List)((ValueComparer>)enum64Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum64Collection)), ((ValueComparer)enum8.GetValueComparer()).Snapshot(source.GetCurrentValue(enum8)), (IEnumerable)source.GetCurrentValue(enum8Array) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer>)enum8Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum8Array)), ((ValueComparer)enum8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum8AsString)), (IEnumerable)source.GetCurrentValue(enum8AsStringArray) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer>)enum8AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum8AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum8AsStringCollection) == null ? null : (List)((ValueComparer>)enum8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum8AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum8Collection) == null ? null : (List)((ValueComparer>)enum8Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum8Collection)), ((ValueComparer)enumToNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(enumToNumberConverterProperty)), ((ValueComparer)enumToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(enumToStringConverterProperty)), ((ValueComparer)enumU16.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU16)), (IEnumerable)source.GetCurrentValue(enumU16Array) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer>)enumU16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU16Array))); + var liftedArg0 = (ISnapshot)new Snapshot, List, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], List, List, List[][], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List, List, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List, List>(((ValueComparer)decimalNumberToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(decimalNumberToStringConverterProperty)), ((ValueComparer)@double.GetValueComparer()).Snapshot(source.GetCurrentValue(@double)), (IEnumerable)source.GetCurrentValue(doubleArray) == null ? null : (double[])((ValueComparer>)doubleArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(doubleArray)), ((ValueComparer)doubleNumberToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(doubleNumberToBytesConverterProperty)), ((ValueComparer)doubleNumberToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(doubleNumberToStringConverterProperty)), ((ValueComparer)enum16.GetValueComparer()).Snapshot(source.GetCurrentValue(enum16)), (IEnumerable)source.GetCurrentValue(enum16Array) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer>)enum16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum16Array)), ((ValueComparer)enum16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum16AsString)), (IEnumerable)source.GetCurrentValue(enum16AsStringArray) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer>)enum16AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum16AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum16AsStringCollection) == null ? null : (List)((ValueComparer>)enum16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum16AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum16Collection) == null ? null : (List)((ValueComparer>)enum16Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum16Collection)), ((ValueComparer)enum32.GetValueComparer()).Snapshot(source.GetCurrentValue(enum32)), (IEnumerable)source.GetCurrentValue(enum32Array) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer>)enum32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum32Array)), ((ValueComparer)enum32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum32AsString)), (IEnumerable)source.GetCurrentValue(enum32AsStringArray) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer>)enum32AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum32AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum32AsStringCollection) == null ? null : (List)((ValueComparer>)enum32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum32AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum32Collection) == null ? null : (List)((ValueComparer>)enum32Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum32Collection)), (object)source.GetCurrentValue[][]>(enum32NestedCollection) == null ? null : (List[][])((ValueComparer)enum32NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>(enum32NestedCollection)), ((ValueComparer)enum64.GetValueComparer()).Snapshot(source.GetCurrentValue(enum64)), (IEnumerable)source.GetCurrentValue(enum64Array) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer>)enum64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum64Array)), ((ValueComparer)enum64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum64AsString)), (IEnumerable)source.GetCurrentValue(enum64AsStringArray) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer>)enum64AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum64AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum64AsStringCollection) == null ? null : (List)((ValueComparer>)enum64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum64AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum64Collection) == null ? null : (List)((ValueComparer>)enum64Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum64Collection)), ((ValueComparer)enum8.GetValueComparer()).Snapshot(source.GetCurrentValue(enum8)), (IEnumerable)source.GetCurrentValue(enum8Array) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer>)enum8Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum8Array)), ((ValueComparer)enum8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum8AsString)), (IEnumerable)source.GetCurrentValue(enum8AsStringArray) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer>)enum8AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum8AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum8AsStringCollection) == null ? null : (List)((ValueComparer>)enum8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum8AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum8Collection) == null ? null : (List)((ValueComparer>)enum8Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum8Collection))); var entity1 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg1 = (ISnapshot)new Snapshot, List, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], List, List, CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], List, List, CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], List, List, float, float[], Guid, Guid[], Guid, Guid, IPAddress, IPAddress[]>(((ValueComparer)enumU16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU16AsString)), (IEnumerable)source.GetCurrentValue(enumU16AsStringArray) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer>)enumU16AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU16AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU16AsStringCollection) == null ? null : (List)((ValueComparer>)enumU16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU16AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU16Collection) == null ? null : (List)((ValueComparer>)enumU16Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU16Collection)), ((ValueComparer)enumU32.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU32)), (IEnumerable)source.GetCurrentValue(enumU32Array) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer>)enumU32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU32Array)), ((ValueComparer)enumU32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU32AsString)), (IEnumerable)source.GetCurrentValue(enumU32AsStringArray) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer>)enumU32AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU32AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU32AsStringCollection) == null ? null : (List)((ValueComparer>)enumU32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU32AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU32Collection) == null ? null : (List)((ValueComparer>)enumU32Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU32Collection)), ((ValueComparer)enumU64.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU64)), (IEnumerable)source.GetCurrentValue(enumU64Array) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer>)enumU64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU64Array)), ((ValueComparer)enumU64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU64AsString)), (IEnumerable)source.GetCurrentValue(enumU64AsStringArray) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer>)enumU64AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU64AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU64AsStringCollection) == null ? null : (List)((ValueComparer>)enumU64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU64AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU64Collection) == null ? null : (List)((ValueComparer>)enumU64Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU64Collection)), ((ValueComparer)enumU8.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU8)), (IEnumerable)source.GetCurrentValue(enumU8Array) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer>)enumU8Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU8Array)), ((ValueComparer)enumU8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU8AsString)), (IEnumerable)source.GetCurrentValue(enumU8AsStringArray) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer>)enumU8AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU8AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU8AsStringCollection) == null ? null : (List)((ValueComparer>)enumU8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU8AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU8Collection) == null ? null : (List)((ValueComparer>)enumU8Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU8Collection)), ((ValueComparer)@float.GetValueComparer()).Snapshot(source.GetCurrentValue(@float)), (IEnumerable)source.GetCurrentValue(floatArray) == null ? null : (float[])((ValueComparer>)floatArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(floatArray)), ((ValueComparer)guid.GetValueComparer()).Snapshot(source.GetCurrentValue(guid)), (IEnumerable)source.GetCurrentValue(guidArray) == null ? null : (Guid[])((ValueComparer>)guidArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(guidArray)), ((ValueComparer)guidToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(guidToBytesConverterProperty)), ((ValueComparer)guidToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(guidToStringConverterProperty)), source.GetCurrentValue(iPAddress) == null ? null : ((ValueComparer)iPAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(iPAddress)), (IEnumerable)source.GetCurrentValue(iPAddressArray) == null ? null : (IPAddress[])((ValueComparer>)iPAddressArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(iPAddressArray))); + var liftedArg1 = (ISnapshot)new Snapshot, List, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], List, List, CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], List, List, CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], List, List, float, float[]>((object)source.GetCurrentValue(enum8NestedCollection) == null ? null : (CompiledModelTestBase.Enum8[][])((ValueComparer)enum8NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(enum8NestedCollection)), ((ValueComparer)enumToNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(enumToNumberConverterProperty)), ((ValueComparer)enumToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(enumToStringConverterProperty)), ((ValueComparer)enumU16.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU16)), (IEnumerable)source.GetCurrentValue(enumU16Array) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer>)enumU16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU16Array)), ((ValueComparer)enumU16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU16AsString)), (IEnumerable)source.GetCurrentValue(enumU16AsStringArray) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer>)enumU16AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU16AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU16AsStringCollection) == null ? null : (List)((ValueComparer>)enumU16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU16AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU16Collection) == null ? null : (List)((ValueComparer>)enumU16Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU16Collection)), ((ValueComparer)enumU32.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU32)), (IEnumerable)source.GetCurrentValue(enumU32Array) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer>)enumU32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU32Array)), ((ValueComparer)enumU32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU32AsString)), (IEnumerable)source.GetCurrentValue(enumU32AsStringArray) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer>)enumU32AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU32AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU32AsStringCollection) == null ? null : (List)((ValueComparer>)enumU32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU32AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU32Collection) == null ? null : (List)((ValueComparer>)enumU32Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU32Collection)), ((ValueComparer)enumU64.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU64)), (IEnumerable)source.GetCurrentValue(enumU64Array) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer>)enumU64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU64Array)), ((ValueComparer)enumU64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU64AsString)), (IEnumerable)source.GetCurrentValue(enumU64AsStringArray) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer>)enumU64AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU64AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU64AsStringCollection) == null ? null : (List)((ValueComparer>)enumU64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU64AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU64Collection) == null ? null : (List)((ValueComparer>)enumU64Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU64Collection)), (object)source.GetCurrentValue(enumU64NestedCollection) == null ? null : (CompiledModelTestBase.EnumU64[][])((ValueComparer)enumU64NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(enumU64NestedCollection)), ((ValueComparer)enumU8.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU8)), (IEnumerable)source.GetCurrentValue(enumU8Array) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer>)enumU8Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU8Array)), ((ValueComparer)enumU8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU8AsString)), (IEnumerable)source.GetCurrentValue(enumU8AsStringArray) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer>)enumU8AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU8AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU8AsStringCollection) == null ? null : (List)((ValueComparer>)enumU8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU8AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU8Collection) == null ? null : (List)((ValueComparer>)enumU8Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU8Collection)), ((ValueComparer)@float.GetValueComparer()).Snapshot(source.GetCurrentValue(@float)), (IEnumerable)source.GetCurrentValue(floatArray) == null ? null : (float[])((ValueComparer>)floatArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(floatArray))); var entity2 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg2 = (ISnapshot)new Snapshot, Nullable, Nullable[], byte[], byte[][], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable>(source.GetCurrentValue(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer)iPAddressToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(iPAddressToBytesConverterProperty)), source.GetCurrentValue(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer)iPAddressToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(iPAddressToStringConverterProperty)), ((ValueComparer)int16.GetValueComparer()).Snapshot(source.GetCurrentValue(int16)), (IEnumerable)source.GetCurrentValue(int16Array) == null ? null : (short[])((ValueComparer>)int16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int16Array)), ((ValueComparer)int32.GetValueComparer()).Snapshot(source.GetCurrentValue(int32)), (IEnumerable)source.GetCurrentValue(int32Array) == null ? null : (int[])((ValueComparer>)int32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int32Array)), ((ValueComparer)int64.GetValueComparer()).Snapshot(source.GetCurrentValue(int64)), (IEnumerable)source.GetCurrentValue(int64Array) == null ? null : (long[])((ValueComparer>)int64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int64Array)), ((ValueComparer)int8.GetValueComparer()).Snapshot(source.GetCurrentValue(int8)), (IEnumerable)source.GetCurrentValue(int8Array) == null ? null : (sbyte[])((ValueComparer>)int8Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int8Array)), ((ValueComparer)intNumberToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(intNumberToBytesConverterProperty)), ((ValueComparer)intNumberToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(intNumberToStringConverterProperty)), source.GetCurrentValue>(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer>)nullIntToNullStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullIntToNullStringConverterProperty)), source.GetCurrentValue>(nullableBool) == null ? null : ((ValueComparer>)nullableBool.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableBool)), (IEnumerable>)source.GetCurrentValue[]>(nullableBoolArray) == null ? null : (Nullable[])((ValueComparer>>)nullableBoolArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableBoolArray)), source.GetCurrentValue(nullableBytes) == null ? null : ((ValueComparer)nullableBytes.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableBytes)), (IEnumerable)source.GetCurrentValue(nullableBytesArray) == null ? null : (byte[][])((ValueComparer>)nullableBytesArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(nullableBytesArray)), source.GetCurrentValue>(nullableChar) == null ? null : ((ValueComparer>)nullableChar.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableChar)), (IEnumerable>)source.GetCurrentValue[]>(nullableCharArray) == null ? null : (Nullable[])((ValueComparer>>)nullableCharArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableCharArray)), source.GetCurrentValue>(nullableDateOnly) == null ? null : ((ValueComparer>)nullableDateOnly.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDateOnly)), (IEnumerable>)source.GetCurrentValue[]>(nullableDateOnlyArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDateOnlyArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDateOnlyArray)), source.GetCurrentValue>(nullableDateTime) == null ? null : ((ValueComparer>)nullableDateTime.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDateTime)), (IEnumerable>)source.GetCurrentValue[]>(nullableDateTimeArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDateTimeArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDateTimeArray)), source.GetCurrentValue>(nullableDecimal) == null ? null : ((ValueComparer>)nullableDecimal.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDecimal)), (IEnumerable>)source.GetCurrentValue[]>(nullableDecimalArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDecimalArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDecimalArray)), source.GetCurrentValue>(nullableDouble) == null ? null : ((ValueComparer>)nullableDouble.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDouble)), (IEnumerable>)source.GetCurrentValue[]>(nullableDoubleArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDoubleArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDoubleArray)), source.GetCurrentValue>(nullableEnum16) == null ? null : ((ValueComparer>)nullableEnum16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum16)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum16Array)), source.GetCurrentValue>(nullableEnum16AsString) == null ? null : ((ValueComparer>)nullableEnum16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum16AsString))); + var liftedArg2 = (ISnapshot)new Snapshot, Guid, Guid, IPAddress, IPAddress[], IPAddress, IPAddress, short, short[], int, int[], int[][], long, long[], IList[], sbyte, sbyte[], sbyte[][][], int, int, Nullable, Nullable, Nullable[], byte[], byte[][], byte[][][], Nullable, Nullable[]>(((ValueComparer)guid.GetValueComparer()).Snapshot(source.GetCurrentValue(guid)), (IEnumerable)source.GetCurrentValue(guidArray) == null ? null : (Guid[])((ValueComparer>)guidArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(guidArray)), (object)source.GetCurrentValue>(guidNestedCollection) == null ? null : (ICollection)((ValueComparer)guidNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(guidNestedCollection)), ((ValueComparer)guidToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(guidToBytesConverterProperty)), ((ValueComparer)guidToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(guidToStringConverterProperty)), source.GetCurrentValue(iPAddress) == null ? null : ((ValueComparer)iPAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(iPAddress)), (object)source.GetCurrentValue(iPAddressArray) == null ? null : (IPAddress[])((ValueComparer)iPAddressArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(iPAddressArray)), source.GetCurrentValue(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer)iPAddressToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(iPAddressToBytesConverterProperty)), source.GetCurrentValue(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer)iPAddressToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(iPAddressToStringConverterProperty)), ((ValueComparer)int16.GetValueComparer()).Snapshot(source.GetCurrentValue(int16)), (IEnumerable)source.GetCurrentValue(int16Array) == null ? null : (short[])((ValueComparer>)int16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int16Array)), ((ValueComparer)int32.GetValueComparer()).Snapshot(source.GetCurrentValue(int32)), (IEnumerable)source.GetCurrentValue(int32Array) == null ? null : (int[])((ValueComparer>)int32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int32Array)), (object)source.GetCurrentValue(int32NestedCollection) == null ? null : (int[][])((ValueComparer)int32NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(int32NestedCollection)), ((ValueComparer)int64.GetValueComparer()).Snapshot(source.GetCurrentValue(int64)), (IEnumerable)source.GetCurrentValue(int64Array) == null ? null : (long[])((ValueComparer>)int64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int64Array)), (object)source.GetCurrentValue[]>(int64NestedCollection) == null ? null : (IList[])((ValueComparer)int64NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[]>(int64NestedCollection)), ((ValueComparer)int8.GetValueComparer()).Snapshot(source.GetCurrentValue(int8)), (IEnumerable)source.GetCurrentValue(int8Array) == null ? null : (sbyte[])((ValueComparer>)int8Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int8Array)), (object)source.GetCurrentValue(int8NestedCollection) == null ? null : (sbyte[][][])((ValueComparer)int8NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(int8NestedCollection)), ((ValueComparer)intNumberToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(intNumberToBytesConverterProperty)), ((ValueComparer)intNumberToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(intNumberToStringConverterProperty)), source.GetCurrentValue>(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer>)nullIntToNullStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullIntToNullStringConverterProperty)), source.GetCurrentValue>(nullableBool) == null ? null : ((ValueComparer>)nullableBool.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableBool)), (IEnumerable>)source.GetCurrentValue[]>(nullableBoolArray) == null ? null : (Nullable[])((ValueComparer>>)nullableBoolArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableBoolArray)), source.GetCurrentValue(nullableBytes) == null ? null : ((ValueComparer)nullableBytes.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableBytes)), (object)source.GetCurrentValue(nullableBytesArray) == null ? null : (byte[][])((ValueComparer)nullableBytesArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullableBytesArray)), (object)source.GetCurrentValue(nullableBytesNestedCollection) == null ? null : (byte[][][])((ValueComparer)nullableBytesNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullableBytesNestedCollection)), source.GetCurrentValue>(nullableChar) == null ? null : ((ValueComparer>)nullableChar.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableChar)), (IEnumerable>)source.GetCurrentValue[]>(nullableCharArray) == null ? null : (Nullable[])((ValueComparer>>)nullableCharArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableCharArray))); var entity3 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg3 = (ISnapshot)new Snapshot[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable>((IEnumerable>)source.GetCurrentValue[]>(nullableEnum16AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum16AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum16AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum16AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum16AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum16Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum16Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum16Collection)), source.GetCurrentValue>(nullableEnum32) == null ? null : ((ValueComparer>)nullableEnum32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum32)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum32Array)), source.GetCurrentValue>(nullableEnum32AsString) == null ? null : ((ValueComparer>)nullableEnum32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum32AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum32AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum32AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum32AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum32AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum32AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum32Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum32Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum32Collection)), source.GetCurrentValue>(nullableEnum64) == null ? null : ((ValueComparer>)nullableEnum64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum64)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum64Array)), source.GetCurrentValue>(nullableEnum64AsString) == null ? null : ((ValueComparer>)nullableEnum64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum64AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum64AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum64AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum64AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum64AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum64AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum64Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum64Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum64Collection)), source.GetCurrentValue>(nullableEnum8) == null ? null : ((ValueComparer>)nullableEnum8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum8)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum8Array)), source.GetCurrentValue>(nullableEnum8AsString) == null ? null : ((ValueComparer>)nullableEnum8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum8AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum8AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum8AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum8AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum8AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum8AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum8Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum8Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum8Collection)), source.GetCurrentValue>(nullableEnumU16) == null ? null : ((ValueComparer>)nullableEnumU16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU16)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16Array)), source.GetCurrentValue>(nullableEnumU16AsString) == null ? null : ((ValueComparer>)nullableEnumU16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU16AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU16AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU16AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU16AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU16Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU16Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU16Collection)), source.GetCurrentValue>(nullableEnumU32) == null ? null : ((ValueComparer>)nullableEnumU32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU32)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32Array)), source.GetCurrentValue>(nullableEnumU32AsString) == null ? null : ((ValueComparer>)nullableEnumU32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU32AsString))); + var liftedArg3 = (ISnapshot)new Snapshot, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable[][][], Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable>(source.GetCurrentValue>(nullableDateOnly) == null ? null : ((ValueComparer>)nullableDateOnly.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDateOnly)), (IEnumerable>)source.GetCurrentValue[]>(nullableDateOnlyArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDateOnlyArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDateOnlyArray)), source.GetCurrentValue>(nullableDateTime) == null ? null : ((ValueComparer>)nullableDateTime.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDateTime)), (IEnumerable>)source.GetCurrentValue[]>(nullableDateTimeArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDateTimeArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDateTimeArray)), source.GetCurrentValue>(nullableDecimal) == null ? null : ((ValueComparer>)nullableDecimal.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDecimal)), (IEnumerable>)source.GetCurrentValue[]>(nullableDecimalArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDecimalArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDecimalArray)), source.GetCurrentValue>(nullableDouble) == null ? null : ((ValueComparer>)nullableDouble.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDouble)), (IEnumerable>)source.GetCurrentValue[]>(nullableDoubleArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDoubleArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDoubleArray)), source.GetCurrentValue>(nullableEnum16) == null ? null : ((ValueComparer>)nullableEnum16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum16)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum16Array)), source.GetCurrentValue>(nullableEnum16AsString) == null ? null : ((ValueComparer>)nullableEnum16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum16AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum16AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum16AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum16AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum16AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum16AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum16Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum16Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum16Collection)), source.GetCurrentValue>(nullableEnum32) == null ? null : ((ValueComparer>)nullableEnum32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum32)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum32Array)), source.GetCurrentValue>(nullableEnum32AsString) == null ? null : ((ValueComparer>)nullableEnum32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum32AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum32AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum32AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum32AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum32AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum32AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum32Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum32Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum32Collection)), (object)source.GetCurrentValue[][][]>(nullableEnum32NestedCollection) == null ? null : (Nullable[][][])((ValueComparer)nullableEnum32NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][][]>(nullableEnum32NestedCollection)), source.GetCurrentValue>(nullableEnum64) == null ? null : ((ValueComparer>)nullableEnum64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum64)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum64Array)), source.GetCurrentValue>(nullableEnum64AsString) == null ? null : ((ValueComparer>)nullableEnum64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum64AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum64AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum64AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum64AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum64AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum64AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum64Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum64Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum64Collection)), source.GetCurrentValue>(nullableEnum8) == null ? null : ((ValueComparer>)nullableEnum8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum8)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum8Array)), source.GetCurrentValue>(nullableEnum8AsString) == null ? null : ((ValueComparer>)nullableEnum8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum8AsString))); var entity4 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg4 = (ISnapshot)new Snapshot[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], IPAddress, IPAddress[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], PhysicalAddress>((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU32AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU32AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU32AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU32Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU32Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU32Collection)), source.GetCurrentValue>(nullableEnumU64) == null ? null : ((ValueComparer>)nullableEnumU64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU64)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64Array)), source.GetCurrentValue>(nullableEnumU64AsString) == null ? null : ((ValueComparer>)nullableEnumU64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU64AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU64AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU64AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU64AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU64Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU64Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU64Collection)), source.GetCurrentValue>(nullableEnumU8) == null ? null : ((ValueComparer>)nullableEnumU8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU8)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8Array)), source.GetCurrentValue>(nullableEnumU8AsString) == null ? null : ((ValueComparer>)nullableEnumU8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU8AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU8AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU8AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU8AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU8Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU8Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU8Collection)), source.GetCurrentValue>(nullableFloat) == null ? null : ((ValueComparer>)nullableFloat.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableFloat)), (IEnumerable>)source.GetCurrentValue[]>(nullableFloatArray) == null ? null : (Nullable[])((ValueComparer>>)nullableFloatArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableFloatArray)), source.GetCurrentValue>(nullableGuid) == null ? null : ((ValueComparer>)nullableGuid.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableGuid)), (IEnumerable>)source.GetCurrentValue[]>(nullableGuidArray) == null ? null : (Nullable[])((ValueComparer>>)nullableGuidArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableGuidArray)), source.GetCurrentValue(nullableIPAddress) == null ? null : ((ValueComparer)nullableIPAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableIPAddress)), (IEnumerable)source.GetCurrentValue(nullableIPAddressArray) == null ? null : (IPAddress[])((ValueComparer>)nullableIPAddressArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(nullableIPAddressArray)), source.GetCurrentValue>(nullableInt16) == null ? null : ((ValueComparer>)nullableInt16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt16)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt16Array)), source.GetCurrentValue>(nullableInt32) == null ? null : ((ValueComparer>)nullableInt32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt32)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt32Array)), source.GetCurrentValue>(nullableInt64) == null ? null : ((ValueComparer>)nullableInt64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt64)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt64Array)), source.GetCurrentValue>(nullableInt8) == null ? null : ((ValueComparer>)nullableInt8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt8)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt8Array)), source.GetCurrentValue(nullablePhysicalAddress) == null ? null : ((ValueComparer)nullablePhysicalAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(nullablePhysicalAddress))); + var liftedArg4 = (ISnapshot)new Snapshot[], List>, List>, Nullable[][], Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable[][], Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable>((IEnumerable>)source.GetCurrentValue[]>(nullableEnum8AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum8AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum8AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum8AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum8AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum8Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum8Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum8Collection)), (object)source.GetCurrentValue[][]>(nullableEnum8NestedCollection) == null ? null : (Nullable[][])((ValueComparer)nullableEnum8NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>(nullableEnum8NestedCollection)), source.GetCurrentValue>(nullableEnumU16) == null ? null : ((ValueComparer>)nullableEnumU16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU16)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16Array)), source.GetCurrentValue>(nullableEnumU16AsString) == null ? null : ((ValueComparer>)nullableEnumU16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU16AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU16AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU16AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU16AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU16Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU16Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU16Collection)), source.GetCurrentValue>(nullableEnumU32) == null ? null : ((ValueComparer>)nullableEnumU32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU32)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32Array)), source.GetCurrentValue>(nullableEnumU32AsString) == null ? null : ((ValueComparer>)nullableEnumU32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU32AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU32AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU32AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU32AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU32Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU32Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU32Collection)), source.GetCurrentValue>(nullableEnumU64) == null ? null : ((ValueComparer>)nullableEnumU64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU64)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64Array)), source.GetCurrentValue>(nullableEnumU64AsString) == null ? null : ((ValueComparer>)nullableEnumU64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU64AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU64AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU64AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU64AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU64Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU64Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU64Collection)), (object)source.GetCurrentValue[][]>(nullableEnumU64NestedCollection) == null ? null : (Nullable[][])((ValueComparer)nullableEnumU64NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>(nullableEnumU64NestedCollection)), source.GetCurrentValue>(nullableEnumU8) == null ? null : ((ValueComparer>)nullableEnumU8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU8)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8Array)), source.GetCurrentValue>(nullableEnumU8AsString) == null ? null : ((ValueComparer>)nullableEnumU8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU8AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU8AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU8AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU8AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU8Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU8Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU8Collection)), source.GetCurrentValue>(nullableFloat) == null ? null : ((ValueComparer>)nullableFloat.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableFloat))); var entity5 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg5 = (ISnapshot)new Snapshot, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Uri, Uri[], PhysicalAddress, PhysicalAddress[], PhysicalAddress, PhysicalAddress, string, string[], string, string, string, string, string, string, string>((IEnumerable)source.GetCurrentValue(nullablePhysicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer>)nullablePhysicalAddressArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(nullablePhysicalAddressArray)), source.GetCurrentValue(nullableString) == null ? null : ((ValueComparer)nullableString.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableString)), (IEnumerable)source.GetCurrentValue(nullableStringArray) == null ? null : (string[])((ValueComparer>)nullableStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(nullableStringArray)), source.GetCurrentValue>(nullableTimeOnly) == null ? null : ((ValueComparer>)nullableTimeOnly.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableTimeOnly)), (IEnumerable>)source.GetCurrentValue[]>(nullableTimeOnlyArray) == null ? null : (Nullable[])((ValueComparer>>)nullableTimeOnlyArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableTimeOnlyArray)), source.GetCurrentValue>(nullableTimeSpan) == null ? null : ((ValueComparer>)nullableTimeSpan.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableTimeSpan)), (IEnumerable>)source.GetCurrentValue[]>(nullableTimeSpanArray) == null ? null : (Nullable[])((ValueComparer>>)nullableTimeSpanArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableTimeSpanArray)), source.GetCurrentValue>(nullableUInt16) == null ? null : ((ValueComparer>)nullableUInt16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt16)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt16Array)), source.GetCurrentValue>(nullableUInt32) == null ? null : ((ValueComparer>)nullableUInt32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt32)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt32Array)), source.GetCurrentValue>(nullableUInt64) == null ? null : ((ValueComparer>)nullableUInt64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt64)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt64Array)), source.GetCurrentValue>(nullableUInt8) == null ? null : ((ValueComparer>)nullableUInt8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt8)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt8Array)), source.GetCurrentValue(nullableUri) == null ? null : ((ValueComparer)nullableUri.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableUri)), (IEnumerable)source.GetCurrentValue(nullableUriArray) == null ? null : (Uri[])((ValueComparer>)nullableUriArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(nullableUriArray)), source.GetCurrentValue(physicalAddress) == null ? null : ((ValueComparer)physicalAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(physicalAddress)), (IEnumerable)source.GetCurrentValue(physicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer>)physicalAddressArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(physicalAddressArray)), source.GetCurrentValue(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer)physicalAddressToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(physicalAddressToBytesConverterProperty)), source.GetCurrentValue(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer)physicalAddressToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(physicalAddressToStringConverterProperty)), source.GetCurrentValue(@string) == null ? null : ((ValueComparer)@string.GetValueComparer()).Snapshot(source.GetCurrentValue(@string)), (IEnumerable)source.GetCurrentValue(stringArray) == null ? null : (string[])((ValueComparer>)stringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(stringArray)), source.GetCurrentValue(stringToBoolConverterProperty) == null ? null : ((ValueComparer)stringToBoolConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToBoolConverterProperty)), source.GetCurrentValue(stringToBytesConverterProperty) == null ? null : ((ValueComparer)stringToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToBytesConverterProperty)), source.GetCurrentValue(stringToCharConverterProperty) == null ? null : ((ValueComparer)stringToCharConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToCharConverterProperty)), source.GetCurrentValue(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer)stringToDateOnlyConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDateOnlyConverterProperty)), source.GetCurrentValue(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer)stringToDateTimeConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDateTimeConverterProperty)), source.GetCurrentValue(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer)stringToDateTimeOffsetConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDateTimeOffsetConverterProperty)), source.GetCurrentValue(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer)stringToDecimalNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDecimalNumberConverterProperty))); + var liftedArg5 = (ISnapshot)new Snapshot[], Nullable, Nullable[], Nullable[][], IPAddress, IPAddress[], Nullable, Nullable[], Nullable, Nullable[], Nullable[][], Nullable, Nullable[], List[][]>, Nullable, Nullable[], PhysicalAddress, PhysicalAddress[], IEnumerable, string, string[], string[][], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[]>((IEnumerable>)source.GetCurrentValue[]>(nullableFloatArray) == null ? null : (Nullable[])((ValueComparer>>)nullableFloatArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableFloatArray)), source.GetCurrentValue>(nullableGuid) == null ? null : ((ValueComparer>)nullableGuid.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableGuid)), (IEnumerable>)source.GetCurrentValue[]>(nullableGuidArray) == null ? null : (Nullable[])((ValueComparer>>)nullableGuidArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableGuidArray)), (object)source.GetCurrentValue[][]>(nullableGuidNestedCollection) == null ? null : (Nullable[][])((ValueComparer)nullableGuidNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>(nullableGuidNestedCollection)), source.GetCurrentValue(nullableIPAddress) == null ? null : ((ValueComparer)nullableIPAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableIPAddress)), (object)source.GetCurrentValue(nullableIPAddressArray) == null ? null : (IPAddress[])((ValueComparer)nullableIPAddressArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullableIPAddressArray)), source.GetCurrentValue>(nullableInt16) == null ? null : ((ValueComparer>)nullableInt16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt16)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt16Array)), source.GetCurrentValue>(nullableInt32) == null ? null : ((ValueComparer>)nullableInt32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt32)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt32Array)), (object)source.GetCurrentValue[][]>(nullableInt32NestedCollection) == null ? null : (Nullable[][])((ValueComparer)nullableInt32NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>(nullableInt32NestedCollection)), source.GetCurrentValue>(nullableInt64) == null ? null : ((ValueComparer>)nullableInt64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt64)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt64Array)), (object)source.GetCurrentValue[][]>>(nullableInt64NestedCollection) == null ? null : (List[][]>)((ValueComparer)nullableInt64NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>>(nullableInt64NestedCollection)), source.GetCurrentValue>(nullableInt8) == null ? null : ((ValueComparer>)nullableInt8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt8)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt8Array)), source.GetCurrentValue(nullablePhysicalAddress) == null ? null : ((ValueComparer)nullablePhysicalAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(nullablePhysicalAddress)), (object)source.GetCurrentValue(nullablePhysicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer)nullablePhysicalAddressArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullablePhysicalAddressArray)), (object)source.GetCurrentValue>(nullablePhysicalAddressNestedCollection) == null ? null : (IEnumerable)((ValueComparer)nullablePhysicalAddressNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(nullablePhysicalAddressNestedCollection)), source.GetCurrentValue(nullableString) == null ? null : ((ValueComparer)nullableString.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableString)), (object)source.GetCurrentValue(nullableStringArray) == null ? null : (string[])((ValueComparer)nullableStringArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullableStringArray)), (object)source.GetCurrentValue(nullableStringNestedCollection) == null ? null : (string[][])((ValueComparer)nullableStringNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullableStringNestedCollection)), source.GetCurrentValue>(nullableTimeOnly) == null ? null : ((ValueComparer>)nullableTimeOnly.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableTimeOnly)), (IEnumerable>)source.GetCurrentValue[]>(nullableTimeOnlyArray) == null ? null : (Nullable[])((ValueComparer>>)nullableTimeOnlyArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableTimeOnlyArray)), source.GetCurrentValue>(nullableTimeSpan) == null ? null : ((ValueComparer>)nullableTimeSpan.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableTimeSpan)), (IEnumerable>)source.GetCurrentValue[]>(nullableTimeSpanArray) == null ? null : (Nullable[])((ValueComparer>>)nullableTimeSpanArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableTimeSpanArray)), source.GetCurrentValue>(nullableUInt16) == null ? null : ((ValueComparer>)nullableUInt16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt16)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt16Array)), source.GetCurrentValue>(nullableUInt32) == null ? null : ((ValueComparer>)nullableUInt32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt32)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt32Array))); var entity6 = (CompiledModelTestBase.ManyTypes)source.Entity; - return (ISnapshot)new MultiSnapshot(new ISnapshot[] { liftedArg, liftedArg0, liftedArg1, liftedArg2, liftedArg3, liftedArg4, liftedArg5, (ISnapshot)new Snapshot(source.GetCurrentValue(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer)stringToDoubleNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDoubleNumberConverterProperty)), source.GetCurrentValue(stringToEnumConverterProperty) == null ? null : ((ValueComparer)stringToEnumConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToEnumConverterProperty)), source.GetCurrentValue(stringToGuidConverterProperty) == null ? null : ((ValueComparer)stringToGuidConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToGuidConverterProperty)), source.GetCurrentValue(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer)stringToIntNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToIntNumberConverterProperty)), source.GetCurrentValue(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer)stringToTimeOnlyConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToTimeOnlyConverterProperty)), source.GetCurrentValue(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer)stringToTimeSpanConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToTimeSpanConverterProperty)), source.GetCurrentValue(stringToUriConverterProperty) == null ? null : ((ValueComparer)stringToUriConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToUriConverterProperty)), ((ValueComparer)timeOnly.GetValueComparer()).Snapshot(source.GetCurrentValue(timeOnly)), (IEnumerable)source.GetCurrentValue(timeOnlyArray) == null ? null : (TimeOnly[])((ValueComparer>)timeOnlyArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(timeOnlyArray)), ((ValueComparer)timeOnlyToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeOnlyToStringConverterProperty)), ((ValueComparer)timeOnlyToTicksConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeOnlyToTicksConverterProperty)), ((ValueComparer)timeSpan.GetValueComparer()).Snapshot(source.GetCurrentValue(timeSpan)), (IEnumerable)source.GetCurrentValue(timeSpanArray) == null ? null : (TimeSpan[])((ValueComparer>)timeSpanArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(timeSpanArray)), ((ValueComparer)timeSpanToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeSpanToStringConverterProperty)), ((ValueComparer)timeSpanToTicksConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeSpanToTicksConverterProperty)), ((ValueComparer)uInt16.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt16)), (IEnumerable)source.GetCurrentValue(uInt16Array) == null ? null : (ushort[])((ValueComparer>)uInt16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uInt16Array)), ((ValueComparer)uInt32.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt32)), (IEnumerable)source.GetCurrentValue(uInt32Array) == null ? null : (uint[])((ValueComparer>)uInt32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uInt32Array)), ((ValueComparer)uInt64.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt64)), (IEnumerable)source.GetCurrentValue(uInt64Array) == null ? null : (ulong[])((ValueComparer>)uInt64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uInt64Array)), ((ValueComparer)uInt8.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt8)), source.GetCurrentValue(uInt8Array) == null ? null : ((ValueComparer)uInt8Array.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt8Array)), source.GetCurrentValue(uri) == null ? null : ((ValueComparer)uri.GetValueComparer()).Snapshot(source.GetCurrentValue(uri)), (IEnumerable)source.GetCurrentValue(uriArray) == null ? null : (Uri[])((ValueComparer>)uriArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uriArray)), source.GetCurrentValue(uriToStringConverterProperty) == null ? null : ((ValueComparer)uriToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(uriToStringConverterProperty))) }); + var liftedArg6 = (ISnapshot)new Snapshot, Nullable[], Nullable, Nullable[], Nullable[][], Uri, Uri[], PhysicalAddress, PhysicalAddress[], PhysicalAddress, PhysicalAddress, string, string[], string[][], string, string, string, string, string, string, string, string, string, string, string, string, string, string, TimeOnly, TimeOnly[]>(source.GetCurrentValue>(nullableUInt64) == null ? null : ((ValueComparer>)nullableUInt64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt64)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt64Array)), source.GetCurrentValue>(nullableUInt8) == null ? null : ((ValueComparer>)nullableUInt8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt8)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt8Array)), (object)source.GetCurrentValue[][]>(nullableUInt8NestedCollection) == null ? null : (Nullable[][])((ValueComparer)nullableUInt8NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>(nullableUInt8NestedCollection)), source.GetCurrentValue(nullableUri) == null ? null : ((ValueComparer)nullableUri.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableUri)), (object)source.GetCurrentValue(nullableUriArray) == null ? null : (Uri[])((ValueComparer)nullableUriArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullableUriArray)), source.GetCurrentValue(physicalAddress) == null ? null : ((ValueComparer)physicalAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(physicalAddress)), (object)source.GetCurrentValue(physicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer)physicalAddressArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(physicalAddressArray)), source.GetCurrentValue(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer)physicalAddressToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(physicalAddressToBytesConverterProperty)), source.GetCurrentValue(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer)physicalAddressToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(physicalAddressToStringConverterProperty)), source.GetCurrentValue(@string) == null ? null : ((ValueComparer)@string.GetValueComparer()).Snapshot(source.GetCurrentValue(@string)), (object)source.GetCurrentValue(stringArray) == null ? null : (string[])((ValueComparer)stringArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(stringArray)), (object)source.GetCurrentValue(stringNestedCollection) == null ? null : (string[][])((ValueComparer)stringNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(stringNestedCollection)), source.GetCurrentValue(stringToBoolConverterProperty) == null ? null : ((ValueComparer)stringToBoolConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToBoolConverterProperty)), source.GetCurrentValue(stringToBytesConverterProperty) == null ? null : ((ValueComparer)stringToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToBytesConverterProperty)), source.GetCurrentValue(stringToCharConverterProperty) == null ? null : ((ValueComparer)stringToCharConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToCharConverterProperty)), source.GetCurrentValue(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer)stringToDateOnlyConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDateOnlyConverterProperty)), source.GetCurrentValue(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer)stringToDateTimeConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDateTimeConverterProperty)), source.GetCurrentValue(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer)stringToDateTimeOffsetConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDateTimeOffsetConverterProperty)), source.GetCurrentValue(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer)stringToDecimalNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDecimalNumberConverterProperty)), source.GetCurrentValue(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer)stringToDoubleNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDoubleNumberConverterProperty)), source.GetCurrentValue(stringToEnumConverterProperty) == null ? null : ((ValueComparer)stringToEnumConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToEnumConverterProperty)), source.GetCurrentValue(stringToGuidConverterProperty) == null ? null : ((ValueComparer)stringToGuidConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToGuidConverterProperty)), source.GetCurrentValue(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer)stringToIntNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToIntNumberConverterProperty)), source.GetCurrentValue(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer)stringToTimeOnlyConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToTimeOnlyConverterProperty)), source.GetCurrentValue(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer)stringToTimeSpanConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToTimeSpanConverterProperty)), source.GetCurrentValue(stringToUriConverterProperty) == null ? null : ((ValueComparer)stringToUriConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToUriConverterProperty)), ((ValueComparer)timeOnly.GetValueComparer()).Snapshot(source.GetCurrentValue(timeOnly)), (IEnumerable)source.GetCurrentValue(timeOnlyArray) == null ? null : (TimeOnly[])((ValueComparer>)timeOnlyArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(timeOnlyArray))); + var entity7 = (CompiledModelTestBase.ManyTypes)source.Entity; + return (ISnapshot)new MultiSnapshot(new ISnapshot[] { liftedArg, liftedArg0, liftedArg1, liftedArg2, liftedArg3, liftedArg4, liftedArg5, liftedArg6, (ISnapshot)new Snapshot, Uri, Uri[], Uri>(((ValueComparer)timeOnlyToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeOnlyToStringConverterProperty)), ((ValueComparer)timeOnlyToTicksConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeOnlyToTicksConverterProperty)), ((ValueComparer)timeSpan.GetValueComparer()).Snapshot(source.GetCurrentValue(timeSpan)), (IEnumerable)source.GetCurrentValue(timeSpanArray) == null ? null : (TimeSpan[])((ValueComparer>)timeSpanArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(timeSpanArray)), ((ValueComparer)timeSpanToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeSpanToStringConverterProperty)), ((ValueComparer)timeSpanToTicksConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeSpanToTicksConverterProperty)), ((ValueComparer)uInt16.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt16)), (IEnumerable)source.GetCurrentValue(uInt16Array) == null ? null : (ushort[])((ValueComparer>)uInt16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uInt16Array)), ((ValueComparer)uInt32.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt32)), (IEnumerable)source.GetCurrentValue(uInt32Array) == null ? null : (uint[])((ValueComparer>)uInt32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uInt32Array)), ((ValueComparer)uInt64.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt64)), (IEnumerable)source.GetCurrentValue(uInt64Array) == null ? null : (ulong[])((ValueComparer>)uInt64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uInt64Array)), ((ValueComparer)uInt8.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt8)), source.GetCurrentValue(uInt8Array) == null ? null : ((ValueComparer)uInt8Array.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt8Array)), (object)source.GetCurrentValue>(uInt8NestedCollection) == null ? null : (List)((ValueComparer)uInt8NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(uInt8NestedCollection)), source.GetCurrentValue(uri) == null ? null : ((ValueComparer)uri.GetValueComparer()).Snapshot(source.GetCurrentValue(uri)), (object)source.GetCurrentValue(uriArray) == null ? null : (Uri[])((ValueComparer)uriArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(uriArray)), source.GetCurrentValue(uriToStringConverterProperty) == null ? null : ((ValueComparer)uriToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(uriToStringConverterProperty))) }); }); runtimeEntityType.SetStoreGeneratedValuesFactory( () => (ISnapshot)new Snapshot(((ValueComparer)id.GetValueComparer()).Snapshot(default(CompiledModelTestBase.ManyTypesId)))); @@ -15018,10 +17403,10 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) return (ISnapshot)new Snapshot(((ValueComparer)id.GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id))); }); runtimeEntityType.Counts = new PropertyCounts( - propertyCount: 236, + propertyCount: 258, navigationCount: 0, complexPropertyCount: 0, - originalValueCount: 236, + originalValueCount: 258, shadowCount: 0, relationshipCount: 1, storeGeneratedCount: 1); @@ -15064,6 +17449,15 @@ public static bool[] ReadBoolArray(CompiledModelTestBase.ManyTypes @this) public static void WriteBoolArray(CompiledModelTestBase.ManyTypes @this, bool[] value) => GetBoolArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref bool[][] GetBoolNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static bool[][] ReadBoolNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetBoolNestedCollection(@this); + + public static void WriteBoolNestedCollection(CompiledModelTestBase.ManyTypes @this, bool[][] value) + => GetBoolNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref bool GetBoolToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -15109,6 +17503,15 @@ public static byte[][] ReadBytesArray(CompiledModelTestBase.ManyTypes @this) public static void WriteBytesArray(CompiledModelTestBase.ManyTypes @this, byte[][] value) => GetBytesArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref byte[][][] GetBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static byte[][][] ReadBytesNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetBytesNestedCollection(@this); + + public static void WriteBytesNestedCollection(CompiledModelTestBase.ManyTypes @this, byte[][][] value) + => GetBytesNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref byte[] GetBytesToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -15145,6 +17548,15 @@ public static char[] ReadCharArray(CompiledModelTestBase.ManyTypes @this) public static void WriteCharArray(CompiledModelTestBase.ManyTypes @this, char[] value) => GetCharArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref char[][] GetCharNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static char[][] ReadCharNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetCharNestedCollection(@this); + + public static void WriteCharNestedCollection(CompiledModelTestBase.ManyTypes @this, char[][] value) + => GetCharNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref char GetCharToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -15433,6 +17845,15 @@ public static void WriteEnum32AsStringCollection(CompiledModelTestBase.ManyTypes public static void WriteEnum32Collection(CompiledModelTestBase.ManyTypes @this, List value) => GetEnum32Collection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref List[][] GetEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static List[][] ReadEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetEnum32NestedCollection(@this); + + public static void WriteEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this, List[][] value) + => GetEnum32NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref CompiledModelTestBase.Enum64 GetEnum64(CompiledModelTestBase.ManyTypes @this); @@ -15541,6 +17962,15 @@ public static void WriteEnum8AsStringCollection(CompiledModelTestBase.ManyTypes public static void WriteEnum8Collection(CompiledModelTestBase.ManyTypes @this, List value) => GetEnum8Collection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref CompiledModelTestBase.Enum8[][] GetEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static CompiledModelTestBase.Enum8[][] ReadEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetEnum8NestedCollection(@this); + + public static void WriteEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this, CompiledModelTestBase.Enum8[][] value) + => GetEnum8NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref CompiledModelTestBase.Enum32 GetEnumToNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -15721,6 +18151,15 @@ public static void WriteEnumU64AsStringCollection(CompiledModelTestBase.ManyType public static void WriteEnumU64Collection(CompiledModelTestBase.ManyTypes @this, List value) => GetEnumU64Collection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref CompiledModelTestBase.EnumU64[][] GetEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static CompiledModelTestBase.EnumU64[][] ReadEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetEnumU64NestedCollection(@this); + + public static void WriteEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this, CompiledModelTestBase.EnumU64[][] value) + => GetEnumU64NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref CompiledModelTestBase.EnumU8 GetEnumU8(CompiledModelTestBase.ManyTypes @this); @@ -15811,6 +18250,15 @@ public static Guid[] ReadGuidArray(CompiledModelTestBase.ManyTypes @this) public static void WriteGuidArray(CompiledModelTestBase.ManyTypes @this, Guid[] value) => GetGuidArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref ICollection GetGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static ICollection ReadGuidNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetGuidNestedCollection(@this); + + public static void WriteGuidNestedCollection(CompiledModelTestBase.ManyTypes @this, ICollection value) + => GetGuidNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref Guid GetGuidToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -15901,6 +18349,15 @@ public static int[] ReadInt32Array(CompiledModelTestBase.ManyTypes @this) public static void WriteInt32Array(CompiledModelTestBase.ManyTypes @this, int[] value) => GetInt32Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref int[][] GetInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static int[][] ReadInt32NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetInt32NestedCollection(@this); + + public static void WriteInt32NestedCollection(CompiledModelTestBase.ManyTypes @this, int[][] value) + => GetInt32NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref long GetInt64(CompiledModelTestBase.ManyTypes @this); @@ -15919,6 +18376,15 @@ public static long[] ReadInt64Array(CompiledModelTestBase.ManyTypes @this) public static void WriteInt64Array(CompiledModelTestBase.ManyTypes @this, long[] value) => GetInt64Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref IList[] GetInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static IList[] ReadInt64NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetInt64NestedCollection(@this); + + public static void WriteInt64NestedCollection(CompiledModelTestBase.ManyTypes @this, IList[] value) + => GetInt64NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref sbyte GetInt8(CompiledModelTestBase.ManyTypes @this); @@ -15937,6 +18403,15 @@ public static sbyte[] ReadInt8Array(CompiledModelTestBase.ManyTypes @this) public static void WriteInt8Array(CompiledModelTestBase.ManyTypes @this, sbyte[] value) => GetInt8Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref sbyte[][][] GetInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static sbyte[][][] ReadInt8NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetInt8NestedCollection(@this); + + public static void WriteInt8NestedCollection(CompiledModelTestBase.ManyTypes @this, sbyte[][][] value) + => GetInt8NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref int GetIntNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -16000,6 +18475,15 @@ public static byte[][] ReadNullableBytesArray(CompiledModelTestBase.ManyTypes @t public static void WriteNullableBytesArray(CompiledModelTestBase.ManyTypes @this, byte[][] value) => GetNullableBytesArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref byte[][][] GetNullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static byte[][][] ReadNullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableBytesNestedCollection(@this); + + public static void WriteNullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this, byte[][][] value) + => GetNullableBytesNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref char? GetNullableChar(CompiledModelTestBase.ManyTypes @this); @@ -16198,6 +18682,15 @@ public static void WriteNullableEnum32AsStringCollection(CompiledModelTestBase.M public static void WriteNullableEnum32Collection(CompiledModelTestBase.ManyTypes @this, List value) => GetNullableEnum32Collection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref CompiledModelTestBase.Enum32?[][][] GetNullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static CompiledModelTestBase.Enum32?[][][] ReadNullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableEnum32NestedCollection(@this); + + public static void WriteNullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this, CompiledModelTestBase.Enum32?[][][] value) + => GetNullableEnum32NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref CompiledModelTestBase.Enum64? GetNullableEnum64(CompiledModelTestBase.ManyTypes @this); @@ -16306,6 +18799,15 @@ public static void WriteNullableEnum8AsStringCollection(CompiledModelTestBase.Ma public static void WriteNullableEnum8Collection(CompiledModelTestBase.ManyTypes @this, List value) => GetNullableEnum8Collection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref CompiledModelTestBase.Enum8?[][] GetNullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static CompiledModelTestBase.Enum8?[][] ReadNullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableEnum8NestedCollection(@this); + + public static void WriteNullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this, CompiledModelTestBase.Enum8?[][] value) + => GetNullableEnum8NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref CompiledModelTestBase.EnumU16? GetNullableEnumU16(CompiledModelTestBase.ManyTypes @this); @@ -16468,6 +18970,15 @@ public static void WriteNullableEnumU64AsStringCollection(CompiledModelTestBase. public static void WriteNullableEnumU64Collection(CompiledModelTestBase.ManyTypes @this, List value) => GetNullableEnumU64Collection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref CompiledModelTestBase.EnumU64?[][] GetNullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static CompiledModelTestBase.EnumU64?[][] ReadNullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableEnumU64NestedCollection(@this); + + public static void WriteNullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this, CompiledModelTestBase.EnumU64?[][] value) + => GetNullableEnumU64NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref CompiledModelTestBase.EnumU8? GetNullableEnumU8(CompiledModelTestBase.ManyTypes @this); @@ -16558,6 +19069,15 @@ public static void WriteNullableGuid(CompiledModelTestBase.ManyTypes @this, Guid public static void WriteNullableGuidArray(CompiledModelTestBase.ManyTypes @this, Guid?[] value) => GetNullableGuidArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref Guid?[][] GetNullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static Guid?[][] ReadNullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableGuidNestedCollection(@this); + + public static void WriteNullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this, Guid?[][] value) + => GetNullableGuidNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref IPAddress GetNullableIPAddress(CompiledModelTestBase.ManyTypes @this); @@ -16612,6 +19132,15 @@ public static void WriteNullableInt32(CompiledModelTestBase.ManyTypes @this, int public static void WriteNullableInt32Array(CompiledModelTestBase.ManyTypes @this, int?[] value) => GetNullableInt32Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref int?[][] GetNullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static int?[][] ReadNullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableInt32NestedCollection(@this); + + public static void WriteNullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this, int?[][] value) + => GetNullableInt32NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref long? GetNullableInt64(CompiledModelTestBase.ManyTypes @this); @@ -16630,6 +19159,15 @@ public static void WriteNullableInt64(CompiledModelTestBase.ManyTypes @this, lon public static void WriteNullableInt64Array(CompiledModelTestBase.ManyTypes @this, long?[] value) => GetNullableInt64Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref List GetNullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static List ReadNullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableInt64NestedCollection(@this); + + public static void WriteNullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this, List value) + => GetNullableInt64NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref sbyte? GetNullableInt8(CompiledModelTestBase.ManyTypes @this); @@ -16666,6 +19204,15 @@ public static PhysicalAddress[] ReadNullablePhysicalAddressArray(CompiledModelTe public static void WriteNullablePhysicalAddressArray(CompiledModelTestBase.ManyTypes @this, PhysicalAddress[] value) => GetNullablePhysicalAddressArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref IEnumerable GetNullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static IEnumerable ReadNullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullablePhysicalAddressNestedCollection(@this); + + public static void WriteNullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this, IEnumerable value) + => GetNullablePhysicalAddressNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref string GetNullableString(CompiledModelTestBase.ManyTypes @this); @@ -16684,6 +19231,15 @@ public static string[] ReadNullableStringArray(CompiledModelTestBase.ManyTypes @ public static void WriteNullableStringArray(CompiledModelTestBase.ManyTypes @this, string[] value) => GetNullableStringArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref string[][] GetNullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static string[][] ReadNullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableStringNestedCollection(@this); + + public static void WriteNullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this, string[][] value) + => GetNullableStringNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref TimeOnly? GetNullableTimeOnly(CompiledModelTestBase.ManyTypes @this); @@ -16792,6 +19348,15 @@ public static void WriteNullableUInt8(CompiledModelTestBase.ManyTypes @this, byt public static void WriteNullableUInt8Array(CompiledModelTestBase.ManyTypes @this, byte?[] value) => GetNullableUInt8Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref byte?[][] GetNullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static byte?[][] ReadNullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableUInt8NestedCollection(@this); + + public static void WriteNullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this, byte?[][] value) + => GetNullableUInt8NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref Uri GetNullableUri(CompiledModelTestBase.ManyTypes @this); @@ -16864,6 +19429,15 @@ public static string[] ReadStringArray(CompiledModelTestBase.ManyTypes @this) public static void WriteStringArray(CompiledModelTestBase.ManyTypes @this, string[] value) => GetStringArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref string[][] GetStringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static string[][] ReadStringNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetStringNestedCollection(@this); + + public static void WriteStringNestedCollection(CompiledModelTestBase.ManyTypes @this, string[][] value) + => GetStringNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref string GetStringToBoolConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -17134,6 +19708,15 @@ public static byte[] ReadUInt8Array(CompiledModelTestBase.ManyTypes @this) public static void WriteUInt8Array(CompiledModelTestBase.ManyTypes @this, byte[] value) => GetUInt8Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref List GetUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static List ReadUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetUInt8NestedCollection(@this); + + public static void WriteUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this, List value) + => GetUInt8NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref Uri GetUri(CompiledModelTestBase.ManyTypes @this); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs index ee817ffb63f..4cbc522187d 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedType0EntityType.cs @@ -235,11 +235,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -251,14 +251,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -320,11 +320,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -336,10 +336,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -389,11 +389,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -405,10 +405,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -458,11 +458,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -474,14 +474,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, IPAddress>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, IPAddress>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -543,11 +543,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), @@ -559,10 +559,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -607,11 +607,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -623,10 +623,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -671,11 +671,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -687,10 +687,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -735,11 +735,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), @@ -751,10 +751,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, short>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, short>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -848,7 +848,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) (InternalEntityEntry source) => { var entity = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot, IList, List, DateTime[], IEnumerable, IList, List>(((ValueComparer)principalDerivedId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalDerivedId)), ((ValueComparer)principalDerivedAlternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalDerivedAlternateId)), ((ValueComparer)id.GetValueComparer()).Snapshot(source.GetCurrentValue(id)), source.GetCurrentValue(details) == null ? null : ((ValueComparer)details.GetValueComparer()).Snapshot(source.GetCurrentValue(details)), ((ValueComparer)number.GetValueComparer()).Snapshot(source.GetCurrentValue(number)), (IEnumerable)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer>)refTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(refTypeArray)), source.GetCurrentValue>(refTypeEnumerable) == null ? null : ((ValueComparer>)refTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(refTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer>)refTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeIList)), (IEnumerable)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer>)refTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); + return (ISnapshot)new Snapshot, IList, List, DateTime[], IEnumerable, IList, List>(((ValueComparer)principalDerivedId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalDerivedId)), ((ValueComparer)principalDerivedAlternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalDerivedAlternateId)), ((ValueComparer)id.GetValueComparer()).Snapshot(source.GetCurrentValue(id)), source.GetCurrentValue(details) == null ? null : ((ValueComparer)details.GetValueComparer()).Snapshot(source.GetCurrentValue(details)), ((ValueComparer)number.GetValueComparer()).Snapshot(source.GetCurrentValue(number)), (object)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer)refTypeArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray)), (object)source.GetCurrentValue>(refTypeEnumerable) == null ? null : (IEnumerable)((ValueComparer)refTypeEnumerable.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable)), (object)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer)refTypeIList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList)), (object)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer)refTypeList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( () => (ISnapshot)new Snapshot(((ValueComparer)principalDerivedId.GetValueComparer()).Snapshot(default(long)), ((ValueComparer)principalDerivedAlternateId.GetValueComparer()).Snapshot(default(Guid)), ((ValueComparer)id.GetValueComparer()).Snapshot(default(int)))); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs index cc2f46ff1ea..c87f6e1c517 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/OwnedTypeEntityType.cs @@ -235,11 +235,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -251,14 +251,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -321,11 +321,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -337,10 +337,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -391,11 +391,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -407,10 +407,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -461,11 +461,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -477,14 +477,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, IPAddress>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, IPAddress>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -547,11 +547,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), @@ -563,10 +563,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -612,11 +612,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -628,10 +628,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -677,11 +677,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -693,10 +693,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -742,11 +742,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), @@ -758,10 +758,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, short>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, short>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -865,7 +865,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) (InternalEntityEntry source) => { var entity = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot, IList, List, DateTime[], IEnumerable, IList, List>(((ValueComparer)principalBaseId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalBaseId)), ((ValueComparer)principalBaseAlternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalBaseAlternateId)), source.GetCurrentValue(details) == null ? null : ((ValueComparer)details.GetValueComparer()).Snapshot(source.GetCurrentValue(details)), ((ValueComparer)number.GetValueComparer()).Snapshot(source.GetCurrentValue(number)), (IEnumerable)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer>)refTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(refTypeArray)), source.GetCurrentValue>(refTypeEnumerable) == null ? null : ((ValueComparer>)refTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(refTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer>)refTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeIList)), (IEnumerable)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer>)refTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); + return (ISnapshot)new Snapshot, IList, List, DateTime[], IEnumerable, IList, List>(((ValueComparer)principalBaseId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalBaseId)), ((ValueComparer)principalBaseAlternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalBaseAlternateId)), source.GetCurrentValue(details) == null ? null : ((ValueComparer)details.GetValueComparer()).Snapshot(source.GetCurrentValue(details)), ((ValueComparer)number.GetValueComparer()).Snapshot(source.GetCurrentValue(number)), (object)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer)refTypeArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray)), (object)source.GetCurrentValue>(refTypeEnumerable) == null ? null : (IEnumerable)((ValueComparer)refTypeEnumerable.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable)), (object)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer)refTypeIList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList)), (object)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer)refTypeList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( () => (ISnapshot)new Snapshot(((ValueComparer)principalBaseId.GetValueComparer()).Snapshot(default(long)), ((ValueComparer)principalBaseAlternateId.GetValueComparer()).Snapshot(default(Guid)))); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs index bbb65501d3c..bea36332dda 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalBaseEntityType.cs @@ -365,11 +365,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -381,14 +381,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -450,11 +450,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -466,10 +466,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -519,11 +519,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -535,10 +535,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -588,11 +588,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -604,14 +604,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, IPAddress>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, IPAddress>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -673,11 +673,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), @@ -689,10 +689,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -737,11 +737,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -753,10 +753,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -801,11 +801,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -817,10 +817,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -865,11 +865,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), @@ -881,10 +881,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, short>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, short>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -988,7 +988,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) (InternalEntityEntry source) => { var entity = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot, Guid, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), ((ValueComparer)alternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(alternateId)), ((ValueComparer)enum1.GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)enum2.GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)flagsEnum1.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)flagsEnum2.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), (IEnumerable)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer>)refTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(refTypeArray)), source.GetCurrentValue>(refTypeEnumerable) == null ? null : ((ValueComparer>)refTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(refTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer>)refTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeIList)), (IEnumerable)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer>)refTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); + return (ISnapshot)new Snapshot, Guid, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), ((ValueComparer)alternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(alternateId)), ((ValueComparer)enum1.GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)enum2.GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)flagsEnum1.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)flagsEnum2.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), (object)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer)refTypeArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray)), (object)source.GetCurrentValue>(refTypeEnumerable) == null ? null : (IEnumerable)((ValueComparer)refTypeEnumerable.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable)), (object)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer)refTypeIList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList)), (object)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer)refTypeList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( () => (ISnapshot)new Snapshot, Guid>(default(Nullable) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(default(Nullable)), ((ValueComparer)alternateId.GetValueComparer()).Snapshot(default(Guid)))); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs index c451995696f..0835674fe26 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel/PrincipalDerivedEntityType.cs @@ -120,7 +120,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) (InternalEntityEntry source) => { var entity = (CompiledModelTestBase.PrincipalDerived>>)source.Entity; - return (ISnapshot)new Snapshot, Guid, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), ((ValueComparer)alternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(alternateId)), ((ValueComparer)enum1.GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)enum2.GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)flagsEnum1.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)flagsEnum2.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), (IEnumerable)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer>)refTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(refTypeArray)), source.GetCurrentValue>(refTypeEnumerable) == null ? null : ((ValueComparer>)refTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(refTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer>)refTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeIList)), (IEnumerable)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer>)refTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); + return (ISnapshot)new Snapshot, Guid, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), ((ValueComparer)alternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(alternateId)), ((ValueComparer)enum1.GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)enum2.GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)flagsEnum1.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)flagsEnum2.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), (object)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer)refTypeArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray)), (object)source.GetCurrentValue>(refTypeEnumerable) == null ? null : (IEnumerable)((ValueComparer)refTypeEnumerable.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable)), (object)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer)refTypeIList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList)), (object)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer)refTypeList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( () => (ISnapshot)new Snapshot, Guid>(default(Nullable) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(default(Nullable)), ((ValueComparer)alternateId.GetValueComparer()).Snapshot(default(Guid)))); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DbContextModelBuilder.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DbContextModelBuilder.cs index 69e28ca1676..8125046b9e6 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DbContextModelBuilder.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/DbContextModelBuilder.cs @@ -183,6 +183,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Bool", boolColumnBase); var boolArrayColumnBase = new ColumnBase("BoolArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("BoolArray", boolArrayColumnBase); + var boolNestedCollectionColumnBase = new ColumnBase("BoolNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("BoolNestedCollection", boolNestedCollectionColumnBase); var boolToStringConverterPropertyColumnBase = new ColumnBase("BoolToStringConverterProperty", "nvarchar(1)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("BoolToStringConverterProperty", boolToStringConverterPropertyColumnBase); var boolToTwoValuesConverterPropertyColumnBase = new ColumnBase("BoolToTwoValuesConverterProperty", "tinyint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -193,6 +195,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Bytes", bytesColumnBase); var bytesArrayColumnBase = new ColumnBase("BytesArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("BytesArray", bytesArrayColumnBase); + var bytesNestedCollectionColumnBase = new ColumnBase("BytesNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("BytesNestedCollection", bytesNestedCollectionColumnBase); var bytesToStringConverterPropertyColumnBase = new ColumnBase("BytesToStringConverterProperty", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("BytesToStringConverterProperty", bytesToStringConverterPropertyColumnBase); var castingConverterPropertyColumnBase = new ColumnBase("CastingConverterProperty", "decimal(18,2)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -201,6 +205,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Char", charColumnBase); var charArrayColumnBase = new ColumnBase("CharArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("CharArray", charArrayColumnBase); + var charNestedCollectionColumnBase = new ColumnBase("CharNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("CharNestedCollection", charNestedCollectionColumnBase); var charToStringConverterPropertyColumnBase = new ColumnBase("CharToStringConverterProperty", "nchar(1)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("CharToStringConverterProperty", charToStringConverterPropertyColumnBase); var dateOnlyColumnBase = new ColumnBase("DateOnly", "date", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -265,6 +271,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum32AsStringCollection", enum32AsStringCollectionColumnBase); var enum32CollectionColumnBase = new ColumnBase("Enum32Collection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum32Collection", enum32CollectionColumnBase); + var enum32NestedCollectionColumnBase = new ColumnBase("Enum32NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum32NestedCollection", enum32NestedCollectionColumnBase); var enum64ColumnBase = new ColumnBase("Enum64", "bigint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum64", enum64ColumnBase); var enum64ArrayColumnBase = new ColumnBase("Enum64Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -289,6 +297,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum8AsStringCollection", enum8AsStringCollectionColumnBase); var enum8CollectionColumnBase = new ColumnBase("Enum8Collection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum8Collection", enum8CollectionColumnBase); + var enum8NestedCollectionColumnBase = new ColumnBase("Enum8NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Enum8NestedCollection", enum8NestedCollectionColumnBase); var enumToNumberConverterPropertyColumnBase = new ColumnBase("EnumToNumberConverterProperty", "int", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("EnumToNumberConverterProperty", enumToNumberConverterPropertyColumnBase); var enumToStringConverterPropertyColumnBase = new ColumnBase("EnumToStringConverterProperty", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -329,6 +339,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("EnumU64AsStringCollection", enumU64AsStringCollectionColumnBase); var enumU64CollectionColumnBase = new ColumnBase("EnumU64Collection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("EnumU64Collection", enumU64CollectionColumnBase); + var enumU64NestedCollectionColumnBase = new ColumnBase("EnumU64NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("EnumU64NestedCollection", enumU64NestedCollectionColumnBase); var enumU8ColumnBase = new ColumnBase("EnumU8", "tinyint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("EnumU8", enumU8ColumnBase); var enumU8ArrayColumnBase = new ColumnBase("EnumU8Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -349,6 +361,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Guid", guidColumnBase); var guidArrayColumnBase = new ColumnBase("GuidArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("GuidArray", guidArrayColumnBase); + var guidNestedCollectionColumnBase = new ColumnBase("GuidNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("GuidNestedCollection", guidNestedCollectionColumnBase); var guidToBytesConverterPropertyColumnBase = new ColumnBase("GuidToBytesConverterProperty", "varbinary(16)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("GuidToBytesConverterProperty", guidToBytesConverterPropertyColumnBase); var guidToStringConverterPropertyColumnBase = new ColumnBase("GuidToStringConverterProperty", "nvarchar(36)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -371,14 +385,20 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int32", int32ColumnBase); var int32ArrayColumnBase = new ColumnBase("Int32Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int32Array", int32ArrayColumnBase); + var int32NestedCollectionColumnBase = new ColumnBase("Int32NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int32NestedCollection", int32NestedCollectionColumnBase); var int64ColumnBase = new ColumnBase("Int64", "bigint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int64", int64ColumnBase); var int64ArrayColumnBase = new ColumnBase("Int64Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int64Array", int64ArrayColumnBase); + var int64NestedCollectionColumnBase = new ColumnBase("Int64NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int64NestedCollection", int64NestedCollectionColumnBase); var int8ColumnBase = new ColumnBase("Int8", "smallint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int8", int8ColumnBase); var int8ArrayColumnBase = new ColumnBase("Int8Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int8Array", int8ArrayColumnBase); + var int8NestedCollectionColumnBase = new ColumnBase("Int8NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Int8NestedCollection", int8NestedCollectionColumnBase); var intNumberToBytesConverterPropertyColumnBase = new ColumnBase("IntNumberToBytesConverterProperty", "varbinary(4)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("IntNumberToBytesConverterProperty", intNumberToBytesConverterPropertyColumnBase); var intNumberToStringConverterPropertyColumnBase = new ColumnBase("IntNumberToStringConverterProperty", "nvarchar(64)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -402,6 +422,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableBytes", nullableBytesColumnBase); var nullableBytesArrayColumnBase = new ColumnBase("NullableBytesArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableBytesArray", nullableBytesArrayColumnBase); + var nullableBytesNestedCollectionColumnBase = new ColumnBase("NullableBytesNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableBytesNestedCollection", nullableBytesNestedCollectionColumnBase); var nullableCharColumnBase = new ColumnBase("NullableChar", "nvarchar(1)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -473,6 +495,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnum32AsStringCollection", nullableEnum32AsStringCollectionColumnBase); var nullableEnum32CollectionColumnBase = new ColumnBase("NullableEnum32Collection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnum32Collection", nullableEnum32CollectionColumnBase); + var nullableEnum32NestedCollectionColumnBase = new ColumnBase("NullableEnum32NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnum32NestedCollection", nullableEnum32NestedCollectionColumnBase); var nullableEnum64ColumnBase = new ColumnBase("NullableEnum64", "bigint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -509,6 +533,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnum8AsStringCollection", nullableEnum8AsStringCollectionColumnBase); var nullableEnum8CollectionColumnBase = new ColumnBase("NullableEnum8Collection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnum8Collection", nullableEnum8CollectionColumnBase); + var nullableEnum8NestedCollectionColumnBase = new ColumnBase("NullableEnum8NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnum8NestedCollection", nullableEnum8NestedCollectionColumnBase); var nullableEnumU16ColumnBase = new ColumnBase("NullableEnumU16", "int", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -563,6 +589,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnumU64AsStringCollection", nullableEnumU64AsStringCollectionColumnBase); var nullableEnumU64CollectionColumnBase = new ColumnBase("NullableEnumU64Collection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnumU64Collection", nullableEnumU64CollectionColumnBase); + var nullableEnumU64NestedCollectionColumnBase = new ColumnBase("NullableEnumU64NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableEnumU64NestedCollection", nullableEnumU64NestedCollectionColumnBase); var nullableEnumU8ColumnBase = new ColumnBase("NullableEnumU8", "tinyint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -595,6 +623,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableGuid", nullableGuidColumnBase); var nullableGuidArrayColumnBase = new ColumnBase("NullableGuidArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableGuidArray", nullableGuidArrayColumnBase); + var nullableGuidNestedCollectionColumnBase = new ColumnBase("NullableGuidNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableGuidNestedCollection", nullableGuidNestedCollectionColumnBase); var nullableIPAddressColumnBase = new ColumnBase("NullableIPAddress", "nvarchar(45)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -616,6 +646,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableInt32", nullableInt32ColumnBase); var nullableInt32ArrayColumnBase = new ColumnBase("NullableInt32Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableInt32Array", nullableInt32ArrayColumnBase); + var nullableInt32NestedCollectionColumnBase = new ColumnBase("NullableInt32NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableInt32NestedCollection", nullableInt32NestedCollectionColumnBase); var nullableInt64ColumnBase = new ColumnBase("NullableInt64", "bigint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -623,6 +655,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableInt64", nullableInt64ColumnBase); var nullableInt64ArrayColumnBase = new ColumnBase("NullableInt64Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableInt64Array", nullableInt64ArrayColumnBase); + var nullableInt64NestedCollectionColumnBase = new ColumnBase("NullableInt64NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableInt64NestedCollection", nullableInt64NestedCollectionColumnBase); var nullableInt8ColumnBase = new ColumnBase("NullableInt8", "smallint", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -637,6 +671,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullablePhysicalAddress", nullablePhysicalAddressColumnBase); var nullablePhysicalAddressArrayColumnBase = new ColumnBase("NullablePhysicalAddressArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullablePhysicalAddressArray", nullablePhysicalAddressArrayColumnBase); + var nullablePhysicalAddressNestedCollectionColumnBase = new ColumnBase("NullablePhysicalAddressNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullablePhysicalAddressNestedCollection", nullablePhysicalAddressNestedCollectionColumnBase); var nullableStringColumnBase = new ColumnBase("NullableString", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -644,6 +680,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableString", nullableStringColumnBase); var nullableStringArrayColumnBase = new ColumnBase("NullableStringArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableStringArray", nullableStringArrayColumnBase); + var nullableStringNestedCollectionColumnBase = new ColumnBase("NullableStringNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableStringNestedCollection", nullableStringNestedCollectionColumnBase); var nullableTimeOnlyColumnBase = new ColumnBase("NullableTimeOnly", "time", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -686,6 +724,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableUInt8", nullableUInt8ColumnBase); var nullableUInt8ArrayColumnBase = new ColumnBase("NullableUInt8Array", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableUInt8Array", nullableUInt8ArrayColumnBase); + var nullableUInt8NestedCollectionColumnBase = new ColumnBase("NullableUInt8NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("NullableUInt8NestedCollection", nullableUInt8NestedCollectionColumnBase); var nullableUriColumnBase = new ColumnBase("NullableUri", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) { IsNullable = true @@ -705,6 +745,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("String", stringColumnBase); var stringArrayColumnBase = new ColumnBase("StringArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("StringArray", stringArrayColumnBase); + var stringNestedCollectionColumnBase = new ColumnBase("StringNestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("StringNestedCollection", stringNestedCollectionColumnBase); var stringToBoolConverterPropertyColumnBase = new ColumnBase("StringToBoolConverterProperty", "bit", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("StringToBoolConverterProperty", stringToBoolConverterPropertyColumnBase); var stringToBytesConverterPropertyColumnBase = new ColumnBase("StringToBytesConverterProperty", "varbinary(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase) @@ -768,6 +810,8 @@ private IRelationalModel CreateRelationalModel() microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("UInt8", uInt8ColumnBase); var uInt8ArrayColumnBase = new ColumnBase("UInt8Array", "varbinary(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("UInt8Array", uInt8ArrayColumnBase); + var uInt8NestedCollectionColumnBase = new ColumnBase("UInt8NestedCollection", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); + microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("UInt8NestedCollection", uInt8NestedCollectionColumnBase); var uriColumnBase = new ColumnBase("Uri", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase.Columns.Add("Uri", uriColumnBase); var uriArrayColumnBase = new ColumnBase("UriArray", "nvarchar(max)", microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesTableBase); @@ -781,15 +825,18 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)idColumnBase0, manyTypes.FindProperty("Id")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)boolColumnBase, manyTypes.FindProperty("Bool")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)boolArrayColumnBase, manyTypes.FindProperty("BoolArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)boolNestedCollectionColumnBase, manyTypes.FindProperty("BoolNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)boolToStringConverterPropertyColumnBase, manyTypes.FindProperty("BoolToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)boolToTwoValuesConverterPropertyColumnBase, manyTypes.FindProperty("BoolToTwoValuesConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)boolToZeroOneConverterPropertyColumnBase, manyTypes.FindProperty("BoolToZeroOneConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)bytesColumnBase, manyTypes.FindProperty("Bytes")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)bytesArrayColumnBase, manyTypes.FindProperty("BytesArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)bytesNestedCollectionColumnBase, manyTypes.FindProperty("BytesNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)bytesToStringConverterPropertyColumnBase, manyTypes.FindProperty("BytesToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)castingConverterPropertyColumnBase, manyTypes.FindProperty("CastingConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)charColumnBase, manyTypes.FindProperty("Char")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)charArrayColumnBase, manyTypes.FindProperty("CharArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)charNestedCollectionColumnBase, manyTypes.FindProperty("CharNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)charToStringConverterPropertyColumnBase, manyTypes.FindProperty("CharToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)dateOnlyColumnBase, manyTypes.FindProperty("DateOnly")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)dateOnlyArrayColumnBase, manyTypes.FindProperty("DateOnlyArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -822,6 +869,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)enum32AsStringArrayColumnBase, manyTypes.FindProperty("Enum32AsStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum32AsStringCollectionColumnBase, manyTypes.FindProperty("Enum32AsStringCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum32CollectionColumnBase, manyTypes.FindProperty("Enum32Collection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)enum32NestedCollectionColumnBase, manyTypes.FindProperty("Enum32NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum64ColumnBase, manyTypes.FindProperty("Enum64")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum64ArrayColumnBase, manyTypes.FindProperty("Enum64Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum64AsStringColumnBase, manyTypes.FindProperty("Enum64AsString")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -834,6 +882,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)enum8AsStringArrayColumnBase, manyTypes.FindProperty("Enum8AsStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum8AsStringCollectionColumnBase, manyTypes.FindProperty("Enum8AsStringCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enum8CollectionColumnBase, manyTypes.FindProperty("Enum8Collection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)enum8NestedCollectionColumnBase, manyTypes.FindProperty("Enum8NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumToNumberConverterPropertyColumnBase, manyTypes.FindProperty("EnumToNumberConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumToStringConverterPropertyColumnBase, manyTypes.FindProperty("EnumToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumU16ColumnBase, manyTypes.FindProperty("EnumU16")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -854,6 +903,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)enumU64AsStringArrayColumnBase, manyTypes.FindProperty("EnumU64AsStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumU64AsStringCollectionColumnBase, manyTypes.FindProperty("EnumU64AsStringCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumU64CollectionColumnBase, manyTypes.FindProperty("EnumU64Collection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)enumU64NestedCollectionColumnBase, manyTypes.FindProperty("EnumU64NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumU8ColumnBase, manyTypes.FindProperty("EnumU8")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumU8ArrayColumnBase, manyTypes.FindProperty("EnumU8Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)enumU8AsStringColumnBase, manyTypes.FindProperty("EnumU8AsString")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -864,6 +914,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)floatArrayColumnBase, manyTypes.FindProperty("FloatArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)guidColumnBase, manyTypes.FindProperty("Guid")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)guidArrayColumnBase, manyTypes.FindProperty("GuidArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)guidNestedCollectionColumnBase, manyTypes.FindProperty("GuidNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)guidToBytesConverterPropertyColumnBase, manyTypes.FindProperty("GuidToBytesConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)guidToStringConverterPropertyColumnBase, manyTypes.FindProperty("GuidToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)iPAddressColumnBase, manyTypes.FindProperty("IPAddress")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -874,10 +925,13 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)int16ArrayColumnBase, manyTypes.FindProperty("Int16Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)int32ColumnBase, manyTypes.FindProperty("Int32")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)int32ArrayColumnBase, manyTypes.FindProperty("Int32Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)int32NestedCollectionColumnBase, manyTypes.FindProperty("Int32NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)int64ColumnBase, manyTypes.FindProperty("Int64")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)int64ArrayColumnBase, manyTypes.FindProperty("Int64Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)int64NestedCollectionColumnBase, manyTypes.FindProperty("Int64NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)int8ColumnBase, manyTypes.FindProperty("Int8")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)int8ArrayColumnBase, manyTypes.FindProperty("Int8Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)int8NestedCollectionColumnBase, manyTypes.FindProperty("Int8NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)intNumberToBytesConverterPropertyColumnBase, manyTypes.FindProperty("IntNumberToBytesConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)intNumberToStringConverterPropertyColumnBase, manyTypes.FindProperty("IntNumberToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullIntToNullStringConverterPropertyColumnBase, manyTypes.FindProperty("NullIntToNullStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -885,6 +939,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)nullableBoolArrayColumnBase, manyTypes.FindProperty("NullableBoolArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableBytesColumnBase, manyTypes.FindProperty("NullableBytes")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableBytesArrayColumnBase, manyTypes.FindProperty("NullableBytesArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableBytesNestedCollectionColumnBase, manyTypes.FindProperty("NullableBytesNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableCharColumnBase, manyTypes.FindProperty("NullableChar")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableCharArrayColumnBase, manyTypes.FindProperty("NullableCharArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableDateOnlyColumnBase, manyTypes.FindProperty("NullableDateOnly")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -907,6 +962,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum32AsStringArrayColumnBase, manyTypes.FindProperty("NullableEnum32AsStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum32AsStringCollectionColumnBase, manyTypes.FindProperty("NullableEnum32AsStringCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum32CollectionColumnBase, manyTypes.FindProperty("NullableEnum32Collection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum32NestedCollectionColumnBase, manyTypes.FindProperty("NullableEnum32NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum64ColumnBase, manyTypes.FindProperty("NullableEnum64")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum64ArrayColumnBase, manyTypes.FindProperty("NullableEnum64Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum64AsStringColumnBase, manyTypes.FindProperty("NullableEnum64AsString")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -919,6 +975,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum8AsStringArrayColumnBase, manyTypes.FindProperty("NullableEnum8AsStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum8AsStringCollectionColumnBase, manyTypes.FindProperty("NullableEnum8AsStringCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum8CollectionColumnBase, manyTypes.FindProperty("NullableEnum8Collection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableEnum8NestedCollectionColumnBase, manyTypes.FindProperty("NullableEnum8NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU16ColumnBase, manyTypes.FindProperty("NullableEnumU16")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU16ArrayColumnBase, manyTypes.FindProperty("NullableEnumU16Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU16AsStringColumnBase, manyTypes.FindProperty("NullableEnumU16AsString")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -937,6 +994,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU64AsStringArrayColumnBase, manyTypes.FindProperty("NullableEnumU64AsStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU64AsStringCollectionColumnBase, manyTypes.FindProperty("NullableEnumU64AsStringCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU64CollectionColumnBase, manyTypes.FindProperty("NullableEnumU64Collection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU64NestedCollectionColumnBase, manyTypes.FindProperty("NullableEnumU64NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU8ColumnBase, manyTypes.FindProperty("NullableEnumU8")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU8ArrayColumnBase, manyTypes.FindProperty("NullableEnumU8Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableEnumU8AsStringColumnBase, manyTypes.FindProperty("NullableEnumU8AsString")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -947,20 +1005,25 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)nullableFloatArrayColumnBase, manyTypes.FindProperty("NullableFloatArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableGuidColumnBase, manyTypes.FindProperty("NullableGuid")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableGuidArrayColumnBase, manyTypes.FindProperty("NullableGuidArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableGuidNestedCollectionColumnBase, manyTypes.FindProperty("NullableGuidNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableIPAddressColumnBase, manyTypes.FindProperty("NullableIPAddress")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableIPAddressArrayColumnBase, manyTypes.FindProperty("NullableIPAddressArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt16ColumnBase, manyTypes.FindProperty("NullableInt16")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt16ArrayColumnBase, manyTypes.FindProperty("NullableInt16Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt32ColumnBase, manyTypes.FindProperty("NullableInt32")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt32ArrayColumnBase, manyTypes.FindProperty("NullableInt32Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableInt32NestedCollectionColumnBase, manyTypes.FindProperty("NullableInt32NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt64ColumnBase, manyTypes.FindProperty("NullableInt64")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt64ArrayColumnBase, manyTypes.FindProperty("NullableInt64Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableInt64NestedCollectionColumnBase, manyTypes.FindProperty("NullableInt64NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt8ColumnBase, manyTypes.FindProperty("NullableInt8")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableInt8ArrayColumnBase, manyTypes.FindProperty("NullableInt8Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullablePhysicalAddressColumnBase, manyTypes.FindProperty("NullablePhysicalAddress")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullablePhysicalAddressArrayColumnBase, manyTypes.FindProperty("NullablePhysicalAddressArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullablePhysicalAddressNestedCollectionColumnBase, manyTypes.FindProperty("NullablePhysicalAddressNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableStringColumnBase, manyTypes.FindProperty("NullableString")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableStringArrayColumnBase, manyTypes.FindProperty("NullableStringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableStringNestedCollectionColumnBase, manyTypes.FindProperty("NullableStringNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableTimeOnlyColumnBase, manyTypes.FindProperty("NullableTimeOnly")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableTimeOnlyArrayColumnBase, manyTypes.FindProperty("NullableTimeOnlyArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableTimeSpanColumnBase, manyTypes.FindProperty("NullableTimeSpan")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -973,6 +1036,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)nullableUInt64ArrayColumnBase, manyTypes.FindProperty("NullableUInt64Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableUInt8ColumnBase, manyTypes.FindProperty("NullableUInt8")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableUInt8ArrayColumnBase, manyTypes.FindProperty("NullableUInt8Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)nullableUInt8NestedCollectionColumnBase, manyTypes.FindProperty("NullableUInt8NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableUriColumnBase, manyTypes.FindProperty("NullableUri")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)nullableUriArrayColumnBase, manyTypes.FindProperty("NullableUriArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)physicalAddressColumnBase, manyTypes.FindProperty("PhysicalAddress")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -981,6 +1045,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)physicalAddressToStringConverterPropertyColumnBase, manyTypes.FindProperty("PhysicalAddressToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)stringColumnBase, manyTypes.FindProperty("String")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)stringArrayColumnBase, manyTypes.FindProperty("StringArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)stringNestedCollectionColumnBase, manyTypes.FindProperty("StringNestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)stringToBoolConverterPropertyColumnBase, manyTypes.FindProperty("StringToBoolConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)stringToBytesConverterPropertyColumnBase, manyTypes.FindProperty("StringToBytesConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)stringToCharConverterPropertyColumnBase, manyTypes.FindProperty("StringToCharConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -1011,6 +1076,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping((ColumnBase)uInt64ArrayColumnBase, manyTypes.FindProperty("UInt64Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)uInt8ColumnBase, manyTypes.FindProperty("UInt8")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)uInt8ArrayColumnBase, manyTypes.FindProperty("UInt8Array")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); + RelationalModel.CreateColumnMapping((ColumnBase)uInt8NestedCollectionColumnBase, manyTypes.FindProperty("UInt8NestedCollection")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)uriColumnBase, manyTypes.FindProperty("Uri")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)uriArrayColumnBase, manyTypes.FindProperty("UriArray")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); RelationalModel.CreateColumnMapping((ColumnBase)uriToStringConverterPropertyColumnBase, manyTypes.FindProperty("UriToStringConverterProperty")!, microsoftEntityFrameworkCoreScaffoldingCompiledModelTestBaseManyTypesMappingBase); @@ -1024,6 +1090,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Bool", boolColumn); var boolArrayColumn = new Column("BoolArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("BoolArray", boolArrayColumn); + var boolNestedCollectionColumn = new Column("BoolNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("BoolNestedCollection", boolNestedCollectionColumn); var boolToStringConverterPropertyColumn = new Column("BoolToStringConverterProperty", "nvarchar(1)", manyTypesTable); manyTypesTable.Columns.Add("BoolToStringConverterProperty", boolToStringConverterPropertyColumn); var boolToTwoValuesConverterPropertyColumn = new Column("BoolToTwoValuesConverterProperty", "tinyint", manyTypesTable); @@ -1034,6 +1102,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Bytes", bytesColumn); var bytesArrayColumn = new Column("BytesArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("BytesArray", bytesArrayColumn); + var bytesNestedCollectionColumn = new Column("BytesNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("BytesNestedCollection", bytesNestedCollectionColumn); var bytesToStringConverterPropertyColumn = new Column("BytesToStringConverterProperty", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("BytesToStringConverterProperty", bytesToStringConverterPropertyColumn); var castingConverterPropertyColumn = new Column("CastingConverterProperty", "decimal(18,2)", manyTypesTable); @@ -1042,6 +1112,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Char", charColumn); var charArrayColumn = new Column("CharArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("CharArray", charArrayColumn); + var charNestedCollectionColumn = new Column("CharNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("CharNestedCollection", charNestedCollectionColumn); var charToStringConverterPropertyColumn = new Column("CharToStringConverterProperty", "nchar(1)", manyTypesTable); manyTypesTable.Columns.Add("CharToStringConverterProperty", charToStringConverterPropertyColumn); var dateOnlyColumn = new Column("DateOnly", "date", manyTypesTable); @@ -1106,6 +1178,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Enum32AsStringCollection", enum32AsStringCollectionColumn); var enum32CollectionColumn = new Column("Enum32Collection", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("Enum32Collection", enum32CollectionColumn); + var enum32NestedCollectionColumn = new Column("Enum32NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("Enum32NestedCollection", enum32NestedCollectionColumn); var enum64Column = new Column("Enum64", "bigint", manyTypesTable); manyTypesTable.Columns.Add("Enum64", enum64Column); var enum64ArrayColumn = new Column("Enum64Array", "nvarchar(max)", manyTypesTable); @@ -1130,6 +1204,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Enum8AsStringCollection", enum8AsStringCollectionColumn); var enum8CollectionColumn = new Column("Enum8Collection", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("Enum8Collection", enum8CollectionColumn); + var enum8NestedCollectionColumn = new Column("Enum8NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("Enum8NestedCollection", enum8NestedCollectionColumn); var enumToNumberConverterPropertyColumn = new Column("EnumToNumberConverterProperty", "int", manyTypesTable); manyTypesTable.Columns.Add("EnumToNumberConverterProperty", enumToNumberConverterPropertyColumn); var enumToStringConverterPropertyColumn = new Column("EnumToStringConverterProperty", "nvarchar(max)", manyTypesTable); @@ -1170,6 +1246,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("EnumU64AsStringCollection", enumU64AsStringCollectionColumn); var enumU64CollectionColumn = new Column("EnumU64Collection", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("EnumU64Collection", enumU64CollectionColumn); + var enumU64NestedCollectionColumn = new Column("EnumU64NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("EnumU64NestedCollection", enumU64NestedCollectionColumn); var enumU8Column = new Column("EnumU8", "tinyint", manyTypesTable); manyTypesTable.Columns.Add("EnumU8", enumU8Column); var enumU8ArrayColumn = new Column("EnumU8Array", "nvarchar(max)", manyTypesTable); @@ -1190,6 +1268,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Guid", guidColumn); var guidArrayColumn = new Column("GuidArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("GuidArray", guidArrayColumn); + var guidNestedCollectionColumn = new Column("GuidNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("GuidNestedCollection", guidNestedCollectionColumn); var guidToBytesConverterPropertyColumn = new Column("GuidToBytesConverterProperty", "varbinary(16)", manyTypesTable); manyTypesTable.Columns.Add("GuidToBytesConverterProperty", guidToBytesConverterPropertyColumn); var guidToStringConverterPropertyColumn = new Column("GuidToStringConverterProperty", "nvarchar(36)", manyTypesTable); @@ -1210,14 +1290,20 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("Int32", int32Column); var int32ArrayColumn = new Column("Int32Array", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("Int32Array", int32ArrayColumn); + var int32NestedCollectionColumn = new Column("Int32NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("Int32NestedCollection", int32NestedCollectionColumn); var int64Column = new Column("Int64", "bigint", manyTypesTable); manyTypesTable.Columns.Add("Int64", int64Column); var int64ArrayColumn = new Column("Int64Array", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("Int64Array", int64ArrayColumn); + var int64NestedCollectionColumn = new Column("Int64NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("Int64NestedCollection", int64NestedCollectionColumn); var int8Column = new Column("Int8", "smallint", manyTypesTable); manyTypesTable.Columns.Add("Int8", int8Column); var int8ArrayColumn = new Column("Int8Array", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("Int8Array", int8ArrayColumn); + var int8NestedCollectionColumn = new Column("Int8NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("Int8NestedCollection", int8NestedCollectionColumn); var intNumberToBytesConverterPropertyColumn = new Column("IntNumberToBytesConverterProperty", "varbinary(4)", manyTypesTable); manyTypesTable.Columns.Add("IntNumberToBytesConverterProperty", intNumberToBytesConverterPropertyColumn); var intNumberToStringConverterPropertyColumn = new Column("IntNumberToStringConverterProperty", "nvarchar(64)", manyTypesTable); @@ -1241,6 +1327,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableBytes", nullableBytesColumn); var nullableBytesArrayColumn = new Column("NullableBytesArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableBytesArray", nullableBytesArrayColumn); + var nullableBytesNestedCollectionColumn = new Column("NullableBytesNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableBytesNestedCollection", nullableBytesNestedCollectionColumn); var nullableCharColumn = new Column("NullableChar", "nvarchar(1)", manyTypesTable) { IsNullable = true @@ -1312,6 +1400,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableEnum32AsStringCollection", nullableEnum32AsStringCollectionColumn); var nullableEnum32CollectionColumn = new Column("NullableEnum32Collection", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableEnum32Collection", nullableEnum32CollectionColumn); + var nullableEnum32NestedCollectionColumn = new Column("NullableEnum32NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableEnum32NestedCollection", nullableEnum32NestedCollectionColumn); var nullableEnum64Column = new Column("NullableEnum64", "bigint", manyTypesTable) { IsNullable = true @@ -1348,6 +1438,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableEnum8AsStringCollection", nullableEnum8AsStringCollectionColumn); var nullableEnum8CollectionColumn = new Column("NullableEnum8Collection", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableEnum8Collection", nullableEnum8CollectionColumn); + var nullableEnum8NestedCollectionColumn = new Column("NullableEnum8NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableEnum8NestedCollection", nullableEnum8NestedCollectionColumn); var nullableEnumU16Column = new Column("NullableEnumU16", "int", manyTypesTable) { IsNullable = true @@ -1402,6 +1494,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableEnumU64AsStringCollection", nullableEnumU64AsStringCollectionColumn); var nullableEnumU64CollectionColumn = new Column("NullableEnumU64Collection", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableEnumU64Collection", nullableEnumU64CollectionColumn); + var nullableEnumU64NestedCollectionColumn = new Column("NullableEnumU64NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableEnumU64NestedCollection", nullableEnumU64NestedCollectionColumn); var nullableEnumU8Column = new Column("NullableEnumU8", "tinyint", manyTypesTable) { IsNullable = true @@ -1434,6 +1528,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableGuid", nullableGuidColumn); var nullableGuidArrayColumn = new Column("NullableGuidArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableGuidArray", nullableGuidArrayColumn); + var nullableGuidNestedCollectionColumn = new Column("NullableGuidNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableGuidNestedCollection", nullableGuidNestedCollectionColumn); var nullableIPAddressColumn = new Column("NullableIPAddress", "nvarchar(45)", manyTypesTable) { IsNullable = true @@ -1455,6 +1551,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableInt32", nullableInt32Column); var nullableInt32ArrayColumn = new Column("NullableInt32Array", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableInt32Array", nullableInt32ArrayColumn); + var nullableInt32NestedCollectionColumn = new Column("NullableInt32NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableInt32NestedCollection", nullableInt32NestedCollectionColumn); var nullableInt64Column = new Column("NullableInt64", "bigint", manyTypesTable) { IsNullable = true @@ -1462,6 +1560,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableInt64", nullableInt64Column); var nullableInt64ArrayColumn = new Column("NullableInt64Array", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableInt64Array", nullableInt64ArrayColumn); + var nullableInt64NestedCollectionColumn = new Column("NullableInt64NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableInt64NestedCollection", nullableInt64NestedCollectionColumn); var nullableInt8Column = new Column("NullableInt8", "smallint", manyTypesTable) { IsNullable = true @@ -1476,6 +1576,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullablePhysicalAddress", nullablePhysicalAddressColumn); var nullablePhysicalAddressArrayColumn = new Column("NullablePhysicalAddressArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullablePhysicalAddressArray", nullablePhysicalAddressArrayColumn); + var nullablePhysicalAddressNestedCollectionColumn = new Column("NullablePhysicalAddressNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullablePhysicalAddressNestedCollection", nullablePhysicalAddressNestedCollectionColumn); var nullableStringColumn = new Column("NullableString", "nvarchar(max)", manyTypesTable) { IsNullable = true @@ -1483,6 +1585,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableString", nullableStringColumn); var nullableStringArrayColumn = new Column("NullableStringArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableStringArray", nullableStringArrayColumn); + var nullableStringNestedCollectionColumn = new Column("NullableStringNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableStringNestedCollection", nullableStringNestedCollectionColumn); var nullableTimeOnlyColumn = new Column("NullableTimeOnly", "time", manyTypesTable) { IsNullable = true @@ -1525,6 +1629,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("NullableUInt8", nullableUInt8Column); var nullableUInt8ArrayColumn = new Column("NullableUInt8Array", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("NullableUInt8Array", nullableUInt8ArrayColumn); + var nullableUInt8NestedCollectionColumn = new Column("NullableUInt8NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("NullableUInt8NestedCollection", nullableUInt8NestedCollectionColumn); var nullableUriColumn = new Column("NullableUri", "nvarchar(max)", manyTypesTable) { IsNullable = true @@ -1544,6 +1650,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("String", stringColumn); var stringArrayColumn = new Column("StringArray", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("StringArray", stringArrayColumn); + var stringNestedCollectionColumn = new Column("StringNestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("StringNestedCollection", stringNestedCollectionColumn); var stringToBoolConverterPropertyColumn = new Column("StringToBoolConverterProperty", "bit", manyTypesTable); manyTypesTable.Columns.Add("StringToBoolConverterProperty", stringToBoolConverterPropertyColumn); var stringToBytesConverterPropertyColumn = new Column("StringToBytesConverterProperty", "varbinary(max)", manyTypesTable) @@ -1607,6 +1715,8 @@ private IRelationalModel CreateRelationalModel() manyTypesTable.Columns.Add("UInt8", uInt8Column); var uInt8ArrayColumn = new Column("UInt8Array", "varbinary(max)", manyTypesTable); manyTypesTable.Columns.Add("UInt8Array", uInt8ArrayColumn); + var uInt8NestedCollectionColumn = new Column("UInt8NestedCollection", "nvarchar(max)", manyTypesTable); + manyTypesTable.Columns.Add("UInt8NestedCollection", uInt8NestedCollectionColumn); var uriColumn = new Column("Uri", "nvarchar(max)", manyTypesTable); manyTypesTable.Columns.Add("Uri", uriColumn); var uriArrayColumn = new Column("UriArray", "nvarchar(max)", manyTypesTable); @@ -1628,15 +1738,18 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(idColumn0, manyTypes.FindProperty("Id")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(boolColumn, manyTypes.FindProperty("Bool")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(boolArrayColumn, manyTypes.FindProperty("BoolArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(boolNestedCollectionColumn, manyTypes.FindProperty("BoolNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(boolToStringConverterPropertyColumn, manyTypes.FindProperty("BoolToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(boolToTwoValuesConverterPropertyColumn, manyTypes.FindProperty("BoolToTwoValuesConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(boolToZeroOneConverterPropertyColumn, manyTypes.FindProperty("BoolToZeroOneConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(bytesColumn, manyTypes.FindProperty("Bytes")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(bytesArrayColumn, manyTypes.FindProperty("BytesArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(bytesNestedCollectionColumn, manyTypes.FindProperty("BytesNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(bytesToStringConverterPropertyColumn, manyTypes.FindProperty("BytesToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(castingConverterPropertyColumn, manyTypes.FindProperty("CastingConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(charColumn, manyTypes.FindProperty("Char")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(charArrayColumn, manyTypes.FindProperty("CharArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(charNestedCollectionColumn, manyTypes.FindProperty("CharNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(charToStringConverterPropertyColumn, manyTypes.FindProperty("CharToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(dateOnlyColumn, manyTypes.FindProperty("DateOnly")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(dateOnlyArrayColumn, manyTypes.FindProperty("DateOnlyArray")!, manyTypesTableMapping); @@ -1669,6 +1782,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(enum32AsStringArrayColumn, manyTypes.FindProperty("Enum32AsStringArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum32AsStringCollectionColumn, manyTypes.FindProperty("Enum32AsStringCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum32CollectionColumn, manyTypes.FindProperty("Enum32Collection")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(enum32NestedCollectionColumn, manyTypes.FindProperty("Enum32NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum64Column, manyTypes.FindProperty("Enum64")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum64ArrayColumn, manyTypes.FindProperty("Enum64Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum64AsStringColumn, manyTypes.FindProperty("Enum64AsString")!, manyTypesTableMapping); @@ -1681,6 +1795,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(enum8AsStringArrayColumn, manyTypes.FindProperty("Enum8AsStringArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum8AsStringCollectionColumn, manyTypes.FindProperty("Enum8AsStringCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enum8CollectionColumn, manyTypes.FindProperty("Enum8Collection")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(enum8NestedCollectionColumn, manyTypes.FindProperty("Enum8NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumToNumberConverterPropertyColumn, manyTypes.FindProperty("EnumToNumberConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumToStringConverterPropertyColumn, manyTypes.FindProperty("EnumToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumU16Column, manyTypes.FindProperty("EnumU16")!, manyTypesTableMapping); @@ -1701,6 +1816,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(enumU64AsStringArrayColumn, manyTypes.FindProperty("EnumU64AsStringArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumU64AsStringCollectionColumn, manyTypes.FindProperty("EnumU64AsStringCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumU64CollectionColumn, manyTypes.FindProperty("EnumU64Collection")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(enumU64NestedCollectionColumn, manyTypes.FindProperty("EnumU64NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumU8Column, manyTypes.FindProperty("EnumU8")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumU8ArrayColumn, manyTypes.FindProperty("EnumU8Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(enumU8AsStringColumn, manyTypes.FindProperty("EnumU8AsString")!, manyTypesTableMapping); @@ -1711,6 +1827,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(floatArrayColumn, manyTypes.FindProperty("FloatArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(guidColumn, manyTypes.FindProperty("Guid")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(guidArrayColumn, manyTypes.FindProperty("GuidArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(guidNestedCollectionColumn, manyTypes.FindProperty("GuidNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(guidToBytesConverterPropertyColumn, manyTypes.FindProperty("GuidToBytesConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(guidToStringConverterPropertyColumn, manyTypes.FindProperty("GuidToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(iPAddressColumn, manyTypes.FindProperty("IPAddress")!, manyTypesTableMapping); @@ -1721,10 +1838,13 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(int16ArrayColumn, manyTypes.FindProperty("Int16Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(int32Column, manyTypes.FindProperty("Int32")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(int32ArrayColumn, manyTypes.FindProperty("Int32Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(int32NestedCollectionColumn, manyTypes.FindProperty("Int32NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(int64Column, manyTypes.FindProperty("Int64")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(int64ArrayColumn, manyTypes.FindProperty("Int64Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(int64NestedCollectionColumn, manyTypes.FindProperty("Int64NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(int8Column, manyTypes.FindProperty("Int8")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(int8ArrayColumn, manyTypes.FindProperty("Int8Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(int8NestedCollectionColumn, manyTypes.FindProperty("Int8NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(intNumberToBytesConverterPropertyColumn, manyTypes.FindProperty("IntNumberToBytesConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(intNumberToStringConverterPropertyColumn, manyTypes.FindProperty("IntNumberToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullIntToNullStringConverterPropertyColumn, manyTypes.FindProperty("NullIntToNullStringConverterProperty")!, manyTypesTableMapping); @@ -1732,6 +1852,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(nullableBoolArrayColumn, manyTypes.FindProperty("NullableBoolArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableBytesColumn, manyTypes.FindProperty("NullableBytes")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableBytesArrayColumn, manyTypes.FindProperty("NullableBytesArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableBytesNestedCollectionColumn, manyTypes.FindProperty("NullableBytesNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableCharColumn, manyTypes.FindProperty("NullableChar")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableCharArrayColumn, manyTypes.FindProperty("NullableCharArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableDateOnlyColumn, manyTypes.FindProperty("NullableDateOnly")!, manyTypesTableMapping); @@ -1754,6 +1875,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(nullableEnum32AsStringArrayColumn, manyTypes.FindProperty("NullableEnum32AsStringArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum32AsStringCollectionColumn, manyTypes.FindProperty("NullableEnum32AsStringCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum32CollectionColumn, manyTypes.FindProperty("NullableEnum32Collection")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableEnum32NestedCollectionColumn, manyTypes.FindProperty("NullableEnum32NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum64Column, manyTypes.FindProperty("NullableEnum64")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum64ArrayColumn, manyTypes.FindProperty("NullableEnum64Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum64AsStringColumn, manyTypes.FindProperty("NullableEnum64AsString")!, manyTypesTableMapping); @@ -1766,6 +1888,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(nullableEnum8AsStringArrayColumn, manyTypes.FindProperty("NullableEnum8AsStringArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum8AsStringCollectionColumn, manyTypes.FindProperty("NullableEnum8AsStringCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnum8CollectionColumn, manyTypes.FindProperty("NullableEnum8Collection")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableEnum8NestedCollectionColumn, manyTypes.FindProperty("NullableEnum8NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU16Column, manyTypes.FindProperty("NullableEnumU16")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU16ArrayColumn, manyTypes.FindProperty("NullableEnumU16Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU16AsStringColumn, manyTypes.FindProperty("NullableEnumU16AsString")!, manyTypesTableMapping); @@ -1784,6 +1907,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(nullableEnumU64AsStringArrayColumn, manyTypes.FindProperty("NullableEnumU64AsStringArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU64AsStringCollectionColumn, manyTypes.FindProperty("NullableEnumU64AsStringCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU64CollectionColumn, manyTypes.FindProperty("NullableEnumU64Collection")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableEnumU64NestedCollectionColumn, manyTypes.FindProperty("NullableEnumU64NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU8Column, manyTypes.FindProperty("NullableEnumU8")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU8ArrayColumn, manyTypes.FindProperty("NullableEnumU8Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableEnumU8AsStringColumn, manyTypes.FindProperty("NullableEnumU8AsString")!, manyTypesTableMapping); @@ -1794,20 +1918,25 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(nullableFloatArrayColumn, manyTypes.FindProperty("NullableFloatArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableGuidColumn, manyTypes.FindProperty("NullableGuid")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableGuidArrayColumn, manyTypes.FindProperty("NullableGuidArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableGuidNestedCollectionColumn, manyTypes.FindProperty("NullableGuidNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableIPAddressColumn, manyTypes.FindProperty("NullableIPAddress")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableIPAddressArrayColumn, manyTypes.FindProperty("NullableIPAddressArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt16Column, manyTypes.FindProperty("NullableInt16")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt16ArrayColumn, manyTypes.FindProperty("NullableInt16Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt32Column, manyTypes.FindProperty("NullableInt32")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt32ArrayColumn, manyTypes.FindProperty("NullableInt32Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableInt32NestedCollectionColumn, manyTypes.FindProperty("NullableInt32NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt64Column, manyTypes.FindProperty("NullableInt64")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt64ArrayColumn, manyTypes.FindProperty("NullableInt64Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableInt64NestedCollectionColumn, manyTypes.FindProperty("NullableInt64NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt8Column, manyTypes.FindProperty("NullableInt8")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableInt8ArrayColumn, manyTypes.FindProperty("NullableInt8Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullablePhysicalAddressColumn, manyTypes.FindProperty("NullablePhysicalAddress")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullablePhysicalAddressArrayColumn, manyTypes.FindProperty("NullablePhysicalAddressArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullablePhysicalAddressNestedCollectionColumn, manyTypes.FindProperty("NullablePhysicalAddressNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableStringColumn, manyTypes.FindProperty("NullableString")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableStringArrayColumn, manyTypes.FindProperty("NullableStringArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableStringNestedCollectionColumn, manyTypes.FindProperty("NullableStringNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableTimeOnlyColumn, manyTypes.FindProperty("NullableTimeOnly")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableTimeOnlyArrayColumn, manyTypes.FindProperty("NullableTimeOnlyArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableTimeSpanColumn, manyTypes.FindProperty("NullableTimeSpan")!, manyTypesTableMapping); @@ -1820,6 +1949,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(nullableUInt64ArrayColumn, manyTypes.FindProperty("NullableUInt64Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableUInt8Column, manyTypes.FindProperty("NullableUInt8")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableUInt8ArrayColumn, manyTypes.FindProperty("NullableUInt8Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(nullableUInt8NestedCollectionColumn, manyTypes.FindProperty("NullableUInt8NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableUriColumn, manyTypes.FindProperty("NullableUri")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(nullableUriArrayColumn, manyTypes.FindProperty("NullableUriArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(physicalAddressColumn, manyTypes.FindProperty("PhysicalAddress")!, manyTypesTableMapping); @@ -1828,6 +1958,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(physicalAddressToStringConverterPropertyColumn, manyTypes.FindProperty("PhysicalAddressToStringConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(stringColumn, manyTypes.FindProperty("String")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(stringArrayColumn, manyTypes.FindProperty("StringArray")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(stringNestedCollectionColumn, manyTypes.FindProperty("StringNestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(stringToBoolConverterPropertyColumn, manyTypes.FindProperty("StringToBoolConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(stringToBytesConverterPropertyColumn, manyTypes.FindProperty("StringToBytesConverterProperty")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(stringToCharConverterPropertyColumn, manyTypes.FindProperty("StringToCharConverterProperty")!, manyTypesTableMapping); @@ -1858,6 +1989,7 @@ private IRelationalModel CreateRelationalModel() RelationalModel.CreateColumnMapping(uInt64ArrayColumn, manyTypes.FindProperty("UInt64Array")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(uInt8Column, manyTypes.FindProperty("UInt8")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(uInt8ArrayColumn, manyTypes.FindProperty("UInt8Array")!, manyTypesTableMapping); + RelationalModel.CreateColumnMapping(uInt8NestedCollectionColumn, manyTypes.FindProperty("UInt8NestedCollection")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(uriColumn, manyTypes.FindProperty("Uri")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(uriArrayColumn, manyTypes.FindProperty("UriArray")!, manyTypesTableMapping); RelationalModel.CreateColumnMapping(uriToStringConverterPropertyColumn, manyTypes.FindProperty("UriToStringConverterProperty")!, manyTypesTableMapping); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesEntityType.cs index ee30773de2f..3eef4065e9e 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/ManyTypesEntityType.cs @@ -33,7 +33,7 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas "Microsoft.EntityFrameworkCore.Scaffolding.CompiledModelTestBase+ManyTypes", typeof(CompiledModelTestBase.ManyTypes), baseEntityType, - propertyCount: 236, + propertyCount: 258, keyCount: 1); var id = runtimeEntityType.AddProperty( @@ -159,11 +159,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); boolArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (bool v1, bool v2) => v1 == v2, (bool v) => v.GetHashCode(), (bool v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (bool v1, bool v2) => v1 == v2, (bool v) => v.GetHashCode(), (bool v) => v)), @@ -175,10 +175,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonBoolReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonBoolReaderWriter.Instance), elementMapping: SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -195,6 +195,93 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (bool v) => v))); boolArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var boolNestedCollection = runtimeEntityType.AddProperty( + "BoolNestedCollection", + typeof(bool[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BoolNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + boolNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadBoolNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadBoolNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadBoolNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadBoolNestedCollection(instance) == null); + boolNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => WriteBoolNestedCollection(entity, value)); + boolNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, bool[][] value) => WriteBoolNestedCollection(entity, value)); + boolNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadBoolNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadBoolNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(boolNestedCollection, 3), + (InternalEntityEntry entry) => entry.GetCurrentValue(boolNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[3]); + boolNestedCollection.SetPropertyIndexes( + index: 3, + originalValueIndex: 3, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + boolNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonBoolReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonBoolReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + JsonBoolReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonBoolReaderWriter.Instance), + elementMapping: SqlServerBoolTypeMapping.Default.Clone( + comparer: new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v), + keyComparer: new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v), + providerValueComparer: new ValueComparer( + (bool v1, bool v2) => v1 == v2, + (bool v) => v.GetHashCode(), + (bool v) => v)))); + boolNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var boolToStringConverterProperty = runtimeEntityType.AddProperty( "BoolToStringConverterProperty", typeof(bool), @@ -212,12 +299,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas boolToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadBoolToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadBoolToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToStringConverterProperty, 3), + (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToStringConverterProperty, 4), (InternalEntityEntry entry) => entry.GetCurrentValue(boolToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[3]); + (ValueBuffer valueBuffer) => valueBuffer[4]); boolToStringConverterProperty.SetPropertyIndexes( - index: 3, - originalValueIndex: 3, + index: 4, + originalValueIndex: 4, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -267,12 +354,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas boolToTwoValuesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadBoolToTwoValuesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadBoolToTwoValuesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToTwoValuesConverterProperty, 4), + (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToTwoValuesConverterProperty, 5), (InternalEntityEntry entry) => entry.GetCurrentValue(boolToTwoValuesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[4]); + (ValueBuffer valueBuffer) => valueBuffer[5]); boolToTwoValuesConverterProperty.SetPropertyIndexes( - index: 4, - originalValueIndex: 4, + index: 5, + originalValueIndex: 5, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -318,12 +405,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas boolToZeroOneConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadBoolToZeroOneConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadBoolToZeroOneConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToZeroOneConverterProperty, 5), + (InternalEntityEntry entry) => entry.ReadOriginalValue(boolToZeroOneConverterProperty, 6), (InternalEntityEntry entry) => entry.GetCurrentValue(boolToZeroOneConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[5]); + (ValueBuffer valueBuffer) => valueBuffer[6]); boolToZeroOneConverterProperty.SetPropertyIndexes( - index: 5, - originalValueIndex: 5, + index: 6, + originalValueIndex: 6, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -368,12 +455,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas bytes.SetAccessors( (InternalEntityEntry entry) => ReadBytes((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadBytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(bytes, 6), + (InternalEntityEntry entry) => entry.ReadOriginalValue(bytes, 7), (InternalEntityEntry entry) => entry.GetCurrentValue(bytes), - (ValueBuffer valueBuffer) => valueBuffer[6]); + (ValueBuffer valueBuffer) => valueBuffer[7]); bytes.SetPropertyIndexes( - index: 6, - originalValueIndex: 6, + index: 7, + originalValueIndex: 7, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -412,21 +499,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas bytesArray.SetAccessors( (InternalEntityEntry entry) => ReadBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesArray, 7), + (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesArray, 8), (InternalEntityEntry entry) => entry.GetCurrentValue(bytesArray), - (ValueBuffer valueBuffer) => valueBuffer[7]); + (ValueBuffer valueBuffer) => valueBuffer[8]); bytesArray.SetPropertyIndexes( - index: 7, - originalValueIndex: 7, + index: 8, + originalValueIndex: 8, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); bytesArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), (byte[] v) => v.GetHashCode(), (byte[] v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), (byte[] v) => v.GetHashCode(), (byte[] v) => v)), @@ -438,10 +525,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( JsonByteArrayReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -461,6 +548,96 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypePostfix: StoreTypePostfix.None)); bytesArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var bytesNestedCollection = runtimeEntityType.AddProperty( + "BytesNestedCollection", + typeof(byte[][][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("BytesNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + bytesNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadBytesNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadBytesNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadBytesNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadBytesNestedCollection(instance) == null); + bytesNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => WriteBytesNestedCollection(entity, value)); + bytesNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => WriteBytesNestedCollection(entity, value)); + bytesNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesNestedCollection, 9), + (InternalEntityEntry entry) => entry.GetCurrentValue(bytesNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[9]); + bytesNestedCollection.SetPropertyIndexes( + index: 9, + originalValueIndex: 9, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + bytesNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v)), + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance), + elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( + comparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v), + keyComparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), + (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), + (byte[] source) => source.ToArray()), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "varbinary(max)"), + storeTypePostfix: StoreTypePostfix.None))); + bytesNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var bytesToStringConverterProperty = runtimeEntityType.AddProperty( "BytesToStringConverterProperty", typeof(byte[]), @@ -480,12 +657,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas bytesToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadBytesToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadBytesToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesToStringConverterProperty, 8), + (InternalEntityEntry entry) => entry.ReadOriginalValue(bytesToStringConverterProperty, 10), (InternalEntityEntry entry) => entry.GetCurrentValue(bytesToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[8]); + (ValueBuffer valueBuffer) => valueBuffer[10]); bytesToStringConverterProperty.SetPropertyIndexes( - index: 8, - originalValueIndex: 8, + index: 10, + originalValueIndex: 10, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -535,12 +712,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas castingConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadCastingConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadCastingConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(castingConverterProperty, 9), + (InternalEntityEntry entry) => entry.ReadOriginalValue(castingConverterProperty, 11), (InternalEntityEntry entry) => entry.GetCurrentValue(castingConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[9]); + (ValueBuffer valueBuffer) => valueBuffer[11]); castingConverterProperty.SetPropertyIndexes( - index: 9, - originalValueIndex: 9, + index: 11, + originalValueIndex: 11, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -585,12 +762,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas @char.SetAccessors( (InternalEntityEntry entry) => ReadChar((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadChar((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(@char, 10), + (InternalEntityEntry entry) => entry.ReadOriginalValue(@char, 12), (InternalEntityEntry entry) => entry.GetCurrentValue(@char), - (ValueBuffer valueBuffer) => valueBuffer[10]); + (ValueBuffer valueBuffer) => valueBuffer[12]); @char.SetPropertyIndexes( - index: 10, - originalValueIndex: 10, + index: 12, + originalValueIndex: 12, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -640,21 +817,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas charArray.SetAccessors( (InternalEntityEntry entry) => ReadCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(charArray, 11), + (InternalEntityEntry entry) => entry.ReadOriginalValue(charArray, 13), (InternalEntityEntry entry) => entry.GetCurrentValue(charArray), - (ValueBuffer valueBuffer) => valueBuffer[11]); + (ValueBuffer valueBuffer) => valueBuffer[13]); charArray.SetPropertyIndexes( - index: 11, - originalValueIndex: 11, + index: 13, + originalValueIndex: 13, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); charArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (char v1, char v2) => v1 == v2, (char v) => (int)v, (char v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (char v1, char v2) => v1 == v2, (char v) => (int)v, (char v) => v)), @@ -666,14 +843,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), (string v) => v.Length < 1 ? '\0' : v[0])))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -707,6 +884,122 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (string v) => v.Length < 1 ? '\0' : v[0])))); charArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var charNestedCollection = runtimeEntityType.AddProperty( + "CharNestedCollection", + typeof(char[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("CharNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + charNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadCharNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadCharNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadCharNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadCharNestedCollection(instance) == null); + charNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, char[][] value) => WriteCharNestedCollection(entity, value)); + charNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, char[][] value) => WriteCharNestedCollection(entity, value)); + charNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadCharNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadCharNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(charNestedCollection, 14), + (InternalEntityEntry entry) => entry.GetCurrentValue(charNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[14]); + charNestedCollection.SetPropertyIndexes( + index: 14, + originalValueIndex: 14, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + charNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (char v1, char v2) => v1 == v2, + (char v) => (int)v, + (char v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (char v1, char v2) => v1 == v2, + (char v) => (int)v, + (char v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), + (string v) => v.Length < 1 ? '\0' : v[0]))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), + (string v) => v.Length < 1 ? '\0' : v[0])))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (char v1, char v2) => v1 == v2, + (char v) => (int)v, + (char v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (char v1, char v2) => v1 == v2, + (char v) => (int)v, + (char v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), + (string v) => v.Length < 1 ? '\0' : v[0])))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), + (string v) => v.Length < 1 ? '\0' : v[0]))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ValueComparer( + (char v1, char v2) => v1 == v2, + (char v) => (int)v, + (char v) => v), + keyComparer: new ValueComparer( + (char v1, char v2) => v1 == v2, + (char v) => (int)v, + (char v) => v), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(1)", + size: 1, + unicode: true, + dbType: System.Data.DbType.String), + converter: new ValueConverter( + (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), + (string v) => v.Length < 1 ? '\0' : v[0]), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), + (string v) => v.Length < 1 ? '\0' : v[0]))))); + charNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var charToStringConverterProperty = runtimeEntityType.AddProperty( "CharToStringConverterProperty", typeof(char), @@ -725,12 +1018,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas charToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadCharToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadCharToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(charToStringConverterProperty, 12), + (InternalEntityEntry entry) => entry.ReadOriginalValue(charToStringConverterProperty, 15), (InternalEntityEntry entry) => entry.GetCurrentValue(charToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[12]); + (ValueBuffer valueBuffer) => valueBuffer[15]); charToStringConverterProperty.SetPropertyIndexes( - index: 12, - originalValueIndex: 12, + index: 15, + originalValueIndex: 15, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -783,12 +1076,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateOnly.SetAccessors( (InternalEntityEntry entry) => ReadDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnly, 13), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnly, 16), (InternalEntityEntry entry) => entry.GetCurrentValue(dateOnly), - (ValueBuffer valueBuffer) => valueBuffer[13]); + (ValueBuffer valueBuffer) => valueBuffer[16]); dateOnly.SetPropertyIndexes( - index: 13, - originalValueIndex: 13, + index: 16, + originalValueIndex: 16, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -824,21 +1117,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateOnlyArray.SetAccessors( (InternalEntityEntry entry) => ReadDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnlyArray, 14), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnlyArray, 17), (InternalEntityEntry entry) => entry.GetCurrentValue(dateOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[14]); + (ValueBuffer valueBuffer) => valueBuffer[17]); dateOnlyArray.SetPropertyIndexes( - index: 14, - originalValueIndex: 14, + index: 17, + originalValueIndex: 17, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); dateOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (DateOnly v1, DateOnly v2) => v1.Equals(v2), (DateOnly v) => v.GetHashCode(), (DateOnly v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (DateOnly v1, DateOnly v2) => v1.Equals(v2), (DateOnly v) => v.GetHashCode(), (DateOnly v) => v)), @@ -850,10 +1143,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateOnlyReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateOnlyReaderWriter.Instance), elementMapping: SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -888,12 +1181,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateOnlyToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnlyToStringConverterProperty, 15), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateOnlyToStringConverterProperty, 18), (InternalEntityEntry entry) => entry.GetCurrentValue(dateOnlyToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[15]); + (ValueBuffer valueBuffer) => valueBuffer[18]); dateOnlyToStringConverterProperty.SetPropertyIndexes( - index: 15, - originalValueIndex: 15, + index: 18, + originalValueIndex: 18, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -944,12 +1237,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTime.SetAccessors( (InternalEntityEntry entry) => ReadDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTime, 16), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTime, 19), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTime), - (ValueBuffer valueBuffer) => valueBuffer[16]); + (ValueBuffer valueBuffer) => valueBuffer[19]); dateTime.SetPropertyIndexes( - index: 16, - originalValueIndex: 16, + index: 19, + originalValueIndex: 19, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -985,21 +1278,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeArray.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeArray, 17), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeArray, 20), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeArray), - (ValueBuffer valueBuffer) => valueBuffer[17]); + (ValueBuffer valueBuffer) => valueBuffer[20]); dateTimeArray.SetPropertyIndexes( - index: 17, - originalValueIndex: 17, + index: 20, + originalValueIndex: 20, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); dateTimeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), @@ -1011,10 +1304,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -1049,12 +1342,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeOffsetToBinaryConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeOffsetToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeOffsetToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToBinaryConverterProperty, 18), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToBinaryConverterProperty, 21), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeOffsetToBinaryConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[18]); + (ValueBuffer valueBuffer) => valueBuffer[21]); dateTimeOffsetToBinaryConverterProperty.SetPropertyIndexes( - index: 18, - originalValueIndex: 18, + index: 21, + originalValueIndex: 21, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1100,12 +1393,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeOffsetToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeOffsetToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeOffsetToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToBytesConverterProperty, 19), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToBytesConverterProperty, 22), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeOffsetToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[19]); + (ValueBuffer valueBuffer) => valueBuffer[22]); dateTimeOffsetToBytesConverterProperty.SetPropertyIndexes( - index: 19, - originalValueIndex: 19, + index: 22, + originalValueIndex: 22, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1154,12 +1447,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeOffsetToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeOffsetToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeOffsetToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToStringConverterProperty, 20), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeOffsetToStringConverterProperty, 23), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeOffsetToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[20]); + (ValueBuffer valueBuffer) => valueBuffer[23]); dateTimeOffsetToStringConverterProperty.SetPropertyIndexes( - index: 20, - originalValueIndex: 20, + index: 23, + originalValueIndex: 23, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1210,12 +1503,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeToBinaryConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeToBinaryConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToBinaryConverterProperty, 21), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToBinaryConverterProperty, 24), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeToBinaryConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[21]); + (ValueBuffer valueBuffer) => valueBuffer[24]); dateTimeToBinaryConverterProperty.SetPropertyIndexes( - index: 21, - originalValueIndex: 21, + index: 24, + originalValueIndex: 24, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1261,12 +1554,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToStringConverterProperty, 22), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToStringConverterProperty, 25), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[22]); + (ValueBuffer valueBuffer) => valueBuffer[25]); dateTimeToStringConverterProperty.SetPropertyIndexes( - index: 22, - originalValueIndex: 22, + index: 25, + originalValueIndex: 25, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1317,12 +1610,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas dateTimeToTicksConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDateTimeToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDateTimeToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToTicksConverterProperty, 23), + (InternalEntityEntry entry) => entry.ReadOriginalValue(dateTimeToTicksConverterProperty, 26), (InternalEntityEntry entry) => entry.GetCurrentValue(dateTimeToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[23]); + (ValueBuffer valueBuffer) => valueBuffer[26]); dateTimeToTicksConverterProperty.SetPropertyIndexes( - index: 23, - originalValueIndex: 23, + index: 26, + originalValueIndex: 26, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1359,12 +1652,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas @decimal.SetAccessors( (InternalEntityEntry entry) => ReadDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(@decimal, 24), + (InternalEntityEntry entry) => entry.ReadOriginalValue(@decimal, 27), (InternalEntityEntry entry) => entry.GetCurrentValue(@decimal), - (ValueBuffer valueBuffer) => valueBuffer[24]); + (ValueBuffer valueBuffer) => valueBuffer[27]); @decimal.SetPropertyIndexes( - index: 24, - originalValueIndex: 24, + index: 27, + originalValueIndex: 27, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1400,21 +1693,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas decimalArray.SetAccessors( (InternalEntityEntry entry) => ReadDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalArray, 25), + (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalArray, 28), (InternalEntityEntry entry) => entry.GetCurrentValue(decimalArray), - (ValueBuffer valueBuffer) => valueBuffer[25]); + (ValueBuffer valueBuffer) => valueBuffer[28]); decimalArray.SetPropertyIndexes( - index: 25, - originalValueIndex: 25, + index: 28, + originalValueIndex: 28, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); decimalArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (decimal v1, decimal v2) => v1 == v2, (decimal v) => v.GetHashCode(), (decimal v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (decimal v1, decimal v2) => v1 == v2, (decimal v) => v.GetHashCode(), (decimal v) => v)), @@ -1426,10 +1719,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDecimalReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDecimalReaderWriter.Instance), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -1464,12 +1757,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas decimalNumberToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDecimalNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDecimalNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalNumberToBytesConverterProperty, 26), + (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalNumberToBytesConverterProperty, 29), (InternalEntityEntry entry) => entry.GetCurrentValue(decimalNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[26]); + (ValueBuffer valueBuffer) => valueBuffer[29]); decimalNumberToBytesConverterProperty.SetPropertyIndexes( - index: 26, - originalValueIndex: 26, + index: 29, + originalValueIndex: 29, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1518,12 +1811,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas decimalNumberToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDecimalNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDecimalNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalNumberToStringConverterProperty, 27), + (InternalEntityEntry entry) => entry.ReadOriginalValue(decimalNumberToStringConverterProperty, 30), (InternalEntityEntry entry) => entry.GetCurrentValue(decimalNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[27]); + (ValueBuffer valueBuffer) => valueBuffer[30]); decimalNumberToStringConverterProperty.SetPropertyIndexes( - index: 27, - originalValueIndex: 27, + index: 30, + originalValueIndex: 30, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1574,12 +1867,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas @double.SetAccessors( (InternalEntityEntry entry) => ReadDouble((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDouble((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(@double, 28), + (InternalEntityEntry entry) => entry.ReadOriginalValue(@double, 31), (InternalEntityEntry entry) => entry.GetCurrentValue(@double), - (ValueBuffer valueBuffer) => valueBuffer[28]); + (ValueBuffer valueBuffer) => valueBuffer[31]); @double.SetPropertyIndexes( - index: 28, - originalValueIndex: 28, + index: 31, + originalValueIndex: 31, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1615,21 +1908,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas doubleArray.SetAccessors( (InternalEntityEntry entry) => ReadDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleArray, 29), + (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleArray, 32), (InternalEntityEntry entry) => entry.GetCurrentValue(doubleArray), - (ValueBuffer valueBuffer) => valueBuffer[29]); + (ValueBuffer valueBuffer) => valueBuffer[32]); doubleArray.SetPropertyIndexes( - index: 29, - originalValueIndex: 29, + index: 32, + originalValueIndex: 32, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); doubleArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (double v1, double v2) => v1.Equals(v2), (double v) => v.GetHashCode(), (double v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (double v1, double v2) => v1.Equals(v2), (double v) => v.GetHashCode(), (double v) => v)), @@ -1641,10 +1934,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDoubleReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDoubleReaderWriter.Instance), elementMapping: SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -1679,12 +1972,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas doubleNumberToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDoubleNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDoubleNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleNumberToBytesConverterProperty, 30), + (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleNumberToBytesConverterProperty, 33), (InternalEntityEntry entry) => entry.GetCurrentValue(doubleNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[30]); + (ValueBuffer valueBuffer) => valueBuffer[33]); doubleNumberToBytesConverterProperty.SetPropertyIndexes( - index: 30, - originalValueIndex: 30, + index: 33, + originalValueIndex: 33, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1733,12 +2026,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas doubleNumberToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadDoubleNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadDoubleNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleNumberToStringConverterProperty, 31), + (InternalEntityEntry entry) => entry.ReadOriginalValue(doubleNumberToStringConverterProperty, 34), (InternalEntityEntry entry) => entry.GetCurrentValue(doubleNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[31]); + (ValueBuffer valueBuffer) => valueBuffer[34]); doubleNumberToStringConverterProperty.SetPropertyIndexes( - index: 31, - originalValueIndex: 31, + index: 34, + originalValueIndex: 34, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1788,12 +2081,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum16.SetAccessors( (InternalEntityEntry entry) => ReadEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16, 32), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16, 35), (InternalEntityEntry entry) => entry.GetCurrentValue(enum16), - (ValueBuffer valueBuffer) => valueBuffer[32]); + (ValueBuffer valueBuffer) => valueBuffer[35]); enum16.SetPropertyIndexes( - index: 32, - originalValueIndex: 32, + index: 35, + originalValueIndex: 35, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1838,21 +2131,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum16Array.SetAccessors( (InternalEntityEntry entry) => ReadEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16Array, 33), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16Array, 36), (InternalEntityEntry entry) => entry.GetCurrentValue(enum16Array), - (ValueBuffer valueBuffer) => valueBuffer[33]); + (ValueBuffer valueBuffer) => valueBuffer[36]); enum16Array.SetPropertyIndexes( - index: 33, - originalValueIndex: 33, + index: 36, + originalValueIndex: 36, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), @@ -1864,14 +2157,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 value) => (short)value, (short value) => (CompiledModelTestBase.Enum16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -1918,12 +2211,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum16AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16AsString, 34), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16AsString, 37), (InternalEntityEntry entry) => entry.GetCurrentValue(enum16AsString), - (ValueBuffer valueBuffer) => valueBuffer[34]); + (ValueBuffer valueBuffer) => valueBuffer[37]); enum16AsString.SetPropertyIndexes( - index: 34, - originalValueIndex: 34, + index: 37, + originalValueIndex: 37, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -1973,21 +2266,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum16AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16AsStringArray, 35), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum16AsStringArray, 38), (InternalEntityEntry entry) => entry.GetCurrentValue(enum16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[35]); + (ValueBuffer valueBuffer) => valueBuffer[38]); enum16AsStringArray.SetPropertyIndexes( - index: 35, - originalValueIndex: 35, + index: 38, + originalValueIndex: 38, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), @@ -1999,14 +2292,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -2057,21 +2350,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum16AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum16AsStringCollection, 36), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum16AsStringCollection, 39), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[36]); + (ValueBuffer valueBuffer) => valueBuffer[39]); enum16AsStringCollection.SetPropertyIndexes( - index: 36, - originalValueIndex: 36, + index: 39, + originalValueIndex: 39, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), @@ -2083,14 +2376,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -2141,21 +2434,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum16Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum16Collection, 37), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum16Collection, 40), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum16Collection), - (ValueBuffer valueBuffer) => valueBuffer[37]); + (ValueBuffer valueBuffer) => valueBuffer[40]); enum16Collection.SetPropertyIndexes( - index: 37, - originalValueIndex: 37, + index: 40, + originalValueIndex: 40, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (CompiledModelTestBase.Enum16 v1, CompiledModelTestBase.Enum16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum16 v) => v.GetHashCode(), (CompiledModelTestBase.Enum16 v) => v)), @@ -2167,14 +2460,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 value) => (short)value, (short value) => (CompiledModelTestBase.Enum16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -2220,12 +2513,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum32.SetAccessors( (InternalEntityEntry entry) => ReadEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32, 38), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32, 41), (InternalEntityEntry entry) => entry.GetCurrentValue(enum32), - (ValueBuffer valueBuffer) => valueBuffer[38]); + (ValueBuffer valueBuffer) => valueBuffer[41]); enum32.SetPropertyIndexes( - index: 38, - originalValueIndex: 38, + index: 41, + originalValueIndex: 41, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -2270,21 +2563,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum32Array.SetAccessors( (InternalEntityEntry entry) => ReadEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32Array, 39), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32Array, 42), (InternalEntityEntry entry) => entry.GetCurrentValue(enum32Array), - (ValueBuffer valueBuffer) => valueBuffer[39]); + (ValueBuffer valueBuffer) => valueBuffer[42]); enum32Array.SetPropertyIndexes( - index: 39, - originalValueIndex: 39, + index: 42, + originalValueIndex: 42, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), @@ -2296,14 +2589,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 value) => (int)value, (int value) => (CompiledModelTestBase.Enum32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -2350,12 +2643,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum32AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32AsString, 40), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32AsString, 43), (InternalEntityEntry entry) => entry.GetCurrentValue(enum32AsString), - (ValueBuffer valueBuffer) => valueBuffer[40]); + (ValueBuffer valueBuffer) => valueBuffer[43]); enum32AsString.SetPropertyIndexes( - index: 40, - originalValueIndex: 40, + index: 43, + originalValueIndex: 43, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -2405,21 +2698,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum32AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32AsStringArray, 41), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum32AsStringArray, 44), (InternalEntityEntry entry) => entry.GetCurrentValue(enum32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[41]); + (ValueBuffer valueBuffer) => valueBuffer[44]); enum32AsStringArray.SetPropertyIndexes( - index: 41, - originalValueIndex: 41, + index: 44, + originalValueIndex: 44, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), @@ -2431,14 +2724,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -2489,21 +2782,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum32AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum32AsStringCollection, 42), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum32AsStringCollection, 45), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[42]); + (ValueBuffer valueBuffer) => valueBuffer[45]); enum32AsStringCollection.SetPropertyIndexes( - index: 42, - originalValueIndex: 42, + index: 45, + originalValueIndex: 45, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), @@ -2515,14 +2808,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -2573,21 +2866,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum32Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum32Collection, 43), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum32Collection, 46), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum32Collection), - (ValueBuffer valueBuffer) => valueBuffer[43]); + (ValueBuffer valueBuffer) => valueBuffer[46]); enum32Collection.SetPropertyIndexes( - index: 43, - originalValueIndex: 43, + index: 46, + originalValueIndex: 46, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), (CompiledModelTestBase.Enum32 v) => v)), @@ -2599,14 +2892,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 value) => (int)value, (int value) => (CompiledModelTestBase.Enum32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -2635,6 +2928,151 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (int value) => (CompiledModelTestBase.Enum32)value)))); enum32Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var enum32NestedCollection = runtimeEntityType.AddProperty( + "Enum32NestedCollection", + typeof(List[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum32NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadEnum32NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadEnum32NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadEnum32NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadEnum32NestedCollection(instance) == null); + enum32NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List[][] value) => WriteEnum32NestedCollection(entity, value)); + enum32NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List[][] value) => WriteEnum32NestedCollection(entity, value)); + enum32NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(enum32NestedCollection, 47), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(enum32NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[47]); + enum32NestedCollection.SetPropertyIndexes( + index: 47, + originalValueIndex: 47, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer[][], List[]>(new ListOfReferenceTypesComparer[], List>(new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v)))), + keyComparer: new ListOfReferenceTypesComparer[][], List[]>(new ListOfReferenceTypesComparer[], List>(new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter[]>(new JsonCollectionOfReferencesReaderWriter[][], List[]>( + new JsonCollectionOfReferencesReaderWriter[], List>( + new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter[][], List[]>( + new JsonCollectionOfReferencesReaderWriter[], List>( + new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value))))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer[], List>(new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v))), + keyComparer: new ListOfReferenceTypesComparer[], List>(new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter>(new JsonCollectionOfReferencesReaderWriter[], List>( + new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter[], List>( + new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v)), + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum32>( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value))), + elementMapping: IntTypeMapping.Default.Clone( + comparer: new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v), + converter: new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))))); + enum32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var enum64 = runtimeEntityType.AddProperty( "Enum64", typeof(CompiledModelTestBase.Enum64), @@ -2652,12 +3090,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum64.SetAccessors( (InternalEntityEntry entry) => ReadEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64, 44), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64, 48), (InternalEntityEntry entry) => entry.GetCurrentValue(enum64), - (ValueBuffer valueBuffer) => valueBuffer[44]); + (ValueBuffer valueBuffer) => valueBuffer[48]); enum64.SetPropertyIndexes( - index: 44, - originalValueIndex: 44, + index: 48, + originalValueIndex: 48, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -2702,21 +3140,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum64Array.SetAccessors( (InternalEntityEntry entry) => ReadEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64Array, 45), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64Array, 49), (InternalEntityEntry entry) => entry.GetCurrentValue(enum64Array), - (ValueBuffer valueBuffer) => valueBuffer[45]); + (ValueBuffer valueBuffer) => valueBuffer[49]); enum64Array.SetPropertyIndexes( - index: 45, - originalValueIndex: 45, + index: 49, + originalValueIndex: 49, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), @@ -2728,14 +3166,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 value) => (long)value, (long value) => (CompiledModelTestBase.Enum64)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -2782,12 +3220,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum64AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64AsString, 46), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64AsString, 50), (InternalEntityEntry entry) => entry.GetCurrentValue(enum64AsString), - (ValueBuffer valueBuffer) => valueBuffer[46]); + (ValueBuffer valueBuffer) => valueBuffer[50]); enum64AsString.SetPropertyIndexes( - index: 46, - originalValueIndex: 46, + index: 50, + originalValueIndex: 50, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -2837,21 +3275,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum64AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64AsStringArray, 47), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum64AsStringArray, 51), (InternalEntityEntry entry) => entry.GetCurrentValue(enum64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[47]); + (ValueBuffer valueBuffer) => valueBuffer[51]); enum64AsStringArray.SetPropertyIndexes( - index: 47, - originalValueIndex: 47, + index: 51, + originalValueIndex: 51, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), @@ -2863,14 +3301,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -2921,21 +3359,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum64AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum64AsStringCollection, 48), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum64AsStringCollection, 52), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[48]); + (ValueBuffer valueBuffer) => valueBuffer[52]); enum64AsStringCollection.SetPropertyIndexes( - index: 48, - originalValueIndex: 48, + index: 52, + originalValueIndex: 52, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), @@ -2947,14 +3385,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -3005,21 +3443,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum64Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum64Collection, 49), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum64Collection, 53), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum64Collection), - (ValueBuffer valueBuffer) => valueBuffer[49]); + (ValueBuffer valueBuffer) => valueBuffer[53]); enum64Collection.SetPropertyIndexes( - index: 49, - originalValueIndex: 49, + index: 53, + originalValueIndex: 53, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (CompiledModelTestBase.Enum64 v1, CompiledModelTestBase.Enum64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum64 v) => v.GetHashCode(), (CompiledModelTestBase.Enum64 v) => v)), @@ -3031,14 +3469,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 value) => (long)value, (long value) => (CompiledModelTestBase.Enum64)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -3084,12 +3522,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum8.SetAccessors( (InternalEntityEntry entry) => ReadEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8, 50), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8, 54), (InternalEntityEntry entry) => entry.GetCurrentValue(enum8), - (ValueBuffer valueBuffer) => valueBuffer[50]); + (ValueBuffer valueBuffer) => valueBuffer[54]); enum8.SetPropertyIndexes( - index: 50, - originalValueIndex: 50, + index: 54, + originalValueIndex: 54, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -3134,21 +3572,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum8Array.SetAccessors( (InternalEntityEntry entry) => ReadEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8Array, 51), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8Array, 55), (InternalEntityEntry entry) => entry.GetCurrentValue(enum8Array), - (ValueBuffer valueBuffer) => valueBuffer[51]); + (ValueBuffer valueBuffer) => valueBuffer[55]); enum8Array.SetPropertyIndexes( - index: 51, - originalValueIndex: 51, + index: 55, + originalValueIndex: 55, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), @@ -3160,14 +3598,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 value) => (short)value, (short value) => (CompiledModelTestBase.Enum8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -3214,12 +3652,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum8AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8AsString, 52), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8AsString, 56), (InternalEntityEntry entry) => entry.GetCurrentValue(enum8AsString), - (ValueBuffer valueBuffer) => valueBuffer[52]); + (ValueBuffer valueBuffer) => valueBuffer[56]); enum8AsString.SetPropertyIndexes( - index: 52, - originalValueIndex: 52, + index: 56, + originalValueIndex: 56, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -3269,21 +3707,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum8AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8AsStringArray, 53), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8AsStringArray, 57), (InternalEntityEntry entry) => entry.GetCurrentValue(enum8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[53]); + (ValueBuffer valueBuffer) => valueBuffer[57]); enum8AsStringArray.SetPropertyIndexes( - index: 53, - originalValueIndex: 53, + index: 57, + originalValueIndex: 57, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), @@ -3295,14 +3733,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -3353,21 +3791,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum8AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum8AsStringCollection, 54), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum8AsStringCollection, 58), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[54]); + (ValueBuffer valueBuffer) => valueBuffer[58]); enum8AsStringCollection.SetPropertyIndexes( - index: 54, - originalValueIndex: 54, + index: 58, + originalValueIndex: 58, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), @@ -3379,14 +3817,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -3437,21 +3875,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enum8Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum8Collection, 55), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enum8Collection, 59), (InternalEntityEntry entry) => entry.GetCurrentValue>(enum8Collection), - (ValueBuffer valueBuffer) => valueBuffer[55]); + (ValueBuffer valueBuffer) => valueBuffer[59]); enum8Collection.SetPropertyIndexes( - index: 55, - originalValueIndex: 55, + index: 59, + originalValueIndex: 59, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enum8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), (CompiledModelTestBase.Enum8 v) => v)), @@ -3463,14 +3901,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 value) => (short)value, (short value) => (CompiledModelTestBase.Enum8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -3499,6 +3937,117 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (short value) => (CompiledModelTestBase.Enum8)value)))); enum8Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var enum8NestedCollection = runtimeEntityType.AddProperty( + "Enum8NestedCollection", + typeof(CompiledModelTestBase.Enum8[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Enum8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enum8NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadEnum8NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadEnum8NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadEnum8NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadEnum8NestedCollection(instance) == null); + enum8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => WriteEnum8NestedCollection(entity, value)); + enum8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.Enum8[][] value) => WriteEnum8NestedCollection(entity, value)); + enum8NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enum8NestedCollection, 60), + (InternalEntityEntry entry) => entry.GetCurrentValue(enum8NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[60]); + enum8NestedCollection.SetPropertyIndexes( + index: 60, + originalValueIndex: 60, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enum8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value))), + elementMapping: SqlServerShortTypeMapping.Default.Clone( + comparer: new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + (short v1, short v2) => v1 == v2, + (short v) => (int)v, + (short v) => v), + converter: new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value))))); + enum8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var enumToNumberConverterProperty = runtimeEntityType.AddProperty( "EnumToNumberConverterProperty", typeof(CompiledModelTestBase.Enum32), @@ -3517,12 +4066,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumToNumberConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadEnumToNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumToNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumToNumberConverterProperty, 56), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumToNumberConverterProperty, 61), (InternalEntityEntry entry) => entry.GetCurrentValue(enumToNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[56]); + (ValueBuffer valueBuffer) => valueBuffer[61]); enumToNumberConverterProperty.SetPropertyIndexes( - index: 56, - originalValueIndex: 56, + index: 61, + originalValueIndex: 61, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -3568,12 +4117,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadEnumToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumToStringConverterProperty, 57), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumToStringConverterProperty, 62), (InternalEntityEntry entry) => entry.GetCurrentValue(enumToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[57]); + (ValueBuffer valueBuffer) => valueBuffer[62]); enumToStringConverterProperty.SetPropertyIndexes( - index: 57, - originalValueIndex: 57, + index: 62, + originalValueIndex: 62, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -3623,12 +4172,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU16.SetAccessors( (InternalEntityEntry entry) => ReadEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16, 58), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16, 63), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU16), - (ValueBuffer valueBuffer) => valueBuffer[58]); + (ValueBuffer valueBuffer) => valueBuffer[63]); enumU16.SetPropertyIndexes( - index: 58, - originalValueIndex: 58, + index: 63, + originalValueIndex: 63, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -3673,21 +4222,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU16Array.SetAccessors( (InternalEntityEntry entry) => ReadEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16Array, 59), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16Array, 64), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU16Array), - (ValueBuffer valueBuffer) => valueBuffer[59]); + (ValueBuffer valueBuffer) => valueBuffer[64]); enumU16Array.SetPropertyIndexes( - index: 59, - originalValueIndex: 59, + index: 64, + originalValueIndex: 64, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), @@ -3699,14 +4248,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 value) => (int)value, (int value) => (CompiledModelTestBase.EnumU16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -3753,12 +4302,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU16AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16AsString, 60), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16AsString, 65), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU16AsString), - (ValueBuffer valueBuffer) => valueBuffer[60]); + (ValueBuffer valueBuffer) => valueBuffer[65]); enumU16AsString.SetPropertyIndexes( - index: 60, - originalValueIndex: 60, + index: 65, + originalValueIndex: 65, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -3808,21 +4357,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU16AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16AsStringArray, 61), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU16AsStringArray, 66), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[61]); + (ValueBuffer valueBuffer) => valueBuffer[66]); enumU16AsStringArray.SetPropertyIndexes( - index: 61, - originalValueIndex: 61, + index: 66, + originalValueIndex: 66, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), @@ -3834,14 +4383,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -3892,21 +4441,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU16AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU16AsStringCollection, 62), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU16AsStringCollection, 67), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[62]); + (ValueBuffer valueBuffer) => valueBuffer[67]); enumU16AsStringCollection.SetPropertyIndexes( - index: 62, - originalValueIndex: 62, + index: 67, + originalValueIndex: 67, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), @@ -3918,14 +4467,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -3976,21 +4525,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU16Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU16Collection, 63), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU16Collection, 68), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU16Collection), - (ValueBuffer valueBuffer) => valueBuffer[63]); + (ValueBuffer valueBuffer) => valueBuffer[68]); enumU16Collection.SetPropertyIndexes( - index: 63, - originalValueIndex: 63, + index: 68, + originalValueIndex: 68, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (CompiledModelTestBase.EnumU16 v1, CompiledModelTestBase.EnumU16 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU16 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU16 v) => v)), @@ -4002,14 +4551,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 value) => (int)value, (int value) => (CompiledModelTestBase.EnumU16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -4055,12 +4604,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU32.SetAccessors( (InternalEntityEntry entry) => ReadEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32, 64), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32, 69), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU32), - (ValueBuffer valueBuffer) => valueBuffer[64]); + (ValueBuffer valueBuffer) => valueBuffer[69]); enumU32.SetPropertyIndexes( - index: 64, - originalValueIndex: 64, + index: 69, + originalValueIndex: 69, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -4105,21 +4654,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU32Array.SetAccessors( (InternalEntityEntry entry) => ReadEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32Array, 65), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32Array, 70), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU32Array), - (ValueBuffer valueBuffer) => valueBuffer[65]); + (ValueBuffer valueBuffer) => valueBuffer[70]); enumU32Array.SetPropertyIndexes( - index: 65, - originalValueIndex: 65, + index: 70, + originalValueIndex: 70, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), @@ -4131,14 +4680,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 value) => (long)value, (long value) => (CompiledModelTestBase.EnumU32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -4185,12 +4734,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU32AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32AsString, 66), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32AsString, 71), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU32AsString), - (ValueBuffer valueBuffer) => valueBuffer[66]); + (ValueBuffer valueBuffer) => valueBuffer[71]); enumU32AsString.SetPropertyIndexes( - index: 66, - originalValueIndex: 66, + index: 71, + originalValueIndex: 71, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -4240,21 +4789,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU32AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32AsStringArray, 67), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU32AsStringArray, 72), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[67]); + (ValueBuffer valueBuffer) => valueBuffer[72]); enumU32AsStringArray.SetPropertyIndexes( - index: 67, - originalValueIndex: 67, + index: 72, + originalValueIndex: 72, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), @@ -4266,14 +4815,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -4324,21 +4873,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU32AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU32AsStringCollection, 68), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU32AsStringCollection, 73), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[68]); + (ValueBuffer valueBuffer) => valueBuffer[73]); enumU32AsStringCollection.SetPropertyIndexes( - index: 68, - originalValueIndex: 68, + index: 73, + originalValueIndex: 73, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), @@ -4350,14 +4899,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -4408,21 +4957,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU32Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU32Collection, 69), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU32Collection, 74), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU32Collection), - (ValueBuffer valueBuffer) => valueBuffer[69]); + (ValueBuffer valueBuffer) => valueBuffer[74]); enumU32Collection.SetPropertyIndexes( - index: 69, - originalValueIndex: 69, + index: 74, + originalValueIndex: 74, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (CompiledModelTestBase.EnumU32 v1, CompiledModelTestBase.EnumU32 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU32 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU32 v) => v)), @@ -4434,14 +4983,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 value) => (long)value, (long value) => (CompiledModelTestBase.EnumU32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -4487,12 +5036,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU64.SetAccessors( (InternalEntityEntry entry) => ReadEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64, 70), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64, 75), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64), - (ValueBuffer valueBuffer) => valueBuffer[70]); + (ValueBuffer valueBuffer) => valueBuffer[75]); enumU64.SetPropertyIndexes( - index: 70, - originalValueIndex: 70, + index: 75, + originalValueIndex: 75, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -4541,21 +5090,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU64Array.SetAccessors( (InternalEntityEntry entry) => ReadEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64Array, 71), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64Array, 76), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64Array), - (ValueBuffer valueBuffer) => valueBuffer[71]); + (ValueBuffer valueBuffer) => valueBuffer[76]); enumU64Array.SetPropertyIndexes( - index: 71, - originalValueIndex: 71, + index: 76, + originalValueIndex: 76, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), @@ -4567,14 +5116,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -4625,12 +5174,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU64AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64AsString, 72), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64AsString, 77), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64AsString), - (ValueBuffer valueBuffer) => valueBuffer[72]); + (ValueBuffer valueBuffer) => valueBuffer[77]); enumU64AsString.SetPropertyIndexes( - index: 72, - originalValueIndex: 72, + index: 77, + originalValueIndex: 77, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -4680,21 +5229,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU64AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64AsStringArray, 73), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64AsStringArray, 78), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[73]); + (ValueBuffer valueBuffer) => valueBuffer[78]); enumU64AsStringArray.SetPropertyIndexes( - index: 73, - originalValueIndex: 73, + index: 78, + originalValueIndex: 78, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), @@ -4706,14 +5255,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -4764,21 +5313,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU64AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU64AsStringCollection, 74), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU64AsStringCollection, 79), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[74]); + (ValueBuffer valueBuffer) => valueBuffer[79]); enumU64AsStringCollection.SetPropertyIndexes( - index: 74, - originalValueIndex: 74, + index: 79, + originalValueIndex: 79, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), @@ -4790,14 +5339,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -4848,21 +5397,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU64Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU64Collection, 75), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU64Collection, 80), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU64Collection), - (ValueBuffer valueBuffer) => valueBuffer[75]); + (ValueBuffer valueBuffer) => valueBuffer[80]); enumU64Collection.SetPropertyIndexes( - index: 75, - originalValueIndex: 75, + index: 80, + originalValueIndex: 80, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU64 v) => v)), @@ -4874,14 +5423,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -4914,6 +5463,121 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); enumU64Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var enumU64NestedCollection = runtimeEntityType.AddProperty( + "EnumU64NestedCollection", + typeof(CompiledModelTestBase.EnumU64[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("EnumU64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + enumU64NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadEnumU64NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadEnumU64NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadEnumU64NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadEnumU64NestedCollection(instance) == null); + enumU64NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => WriteEnumU64NestedCollection(entity, value)); + enumU64NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, CompiledModelTestBase.EnumU64[][] value) => WriteEnumU64NestedCollection(entity, value)); + enumU64NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU64NestedCollection, 81), + (InternalEntityEntry entry) => entry.GetCurrentValue(enumU64NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[81]); + enumU64NestedCollection.SetPropertyIndexes( + index: 81, + originalValueIndex: 81, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + enumU64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + elementMapping: SqlServerDecimalTypeMapping.Default.Clone( + comparer: new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + (decimal v1, decimal v2) => v1 == v2, + (decimal v) => v.GetHashCode(), + (decimal v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "decimal(20,0)", + precision: 20, + scale: 0), + converter: new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))); + enumU64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var enumU8 = runtimeEntityType.AddProperty( "EnumU8", typeof(CompiledModelTestBase.EnumU8), @@ -4931,12 +5595,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU8.SetAccessors( (InternalEntityEntry entry) => ReadEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8, 76), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8, 82), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU8), - (ValueBuffer valueBuffer) => valueBuffer[76]); + (ValueBuffer valueBuffer) => valueBuffer[82]); enumU8.SetPropertyIndexes( - index: 76, - originalValueIndex: 76, + index: 82, + originalValueIndex: 82, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -4981,21 +5645,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU8Array.SetAccessors( (InternalEntityEntry entry) => ReadEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8Array, 77), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8Array, 83), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU8Array), - (ValueBuffer valueBuffer) => valueBuffer[77]); + (ValueBuffer valueBuffer) => valueBuffer[83]); enumU8Array.SetPropertyIndexes( - index: 77, - originalValueIndex: 77, + index: 83, + originalValueIndex: 83, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), @@ -5007,14 +5671,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 value) => (byte)value, (byte value) => (CompiledModelTestBase.EnumU8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( @@ -5061,12 +5725,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU8AsString.SetAccessors( (InternalEntityEntry entry) => ReadEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8AsString, 78), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8AsString, 84), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU8AsString), - (ValueBuffer valueBuffer) => valueBuffer[78]); + (ValueBuffer valueBuffer) => valueBuffer[84]); enumU8AsString.SetPropertyIndexes( - index: 78, - originalValueIndex: 78, + index: 84, + originalValueIndex: 84, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5116,21 +5780,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU8AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8AsStringArray, 79), + (InternalEntityEntry entry) => entry.ReadOriginalValue(enumU8AsStringArray, 85), (InternalEntityEntry entry) => entry.GetCurrentValue(enumU8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[79]); + (ValueBuffer valueBuffer) => valueBuffer[85]); enumU8AsStringArray.SetPropertyIndexes( - index: 79, - originalValueIndex: 79, + index: 85, + originalValueIndex: 85, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), @@ -5142,14 +5806,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -5200,21 +5864,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU8AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU8AsStringCollection, 80), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU8AsStringCollection, 86), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[80]); + (ValueBuffer valueBuffer) => valueBuffer[86]); enumU8AsStringCollection.SetPropertyIndexes( - index: 80, - originalValueIndex: 80, + index: 86, + originalValueIndex: 86, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), @@ -5226,14 +5890,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 v) => v.ToString(), (string v) => StringEnumConverter.ConvertToEnum(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -5284,21 +5948,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas enumU8Collection.SetAccessors( (InternalEntityEntry entry) => ReadEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU8Collection, 81), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(enumU8Collection, 87), (InternalEntityEntry entry) => entry.GetCurrentValue>(enumU8Collection), - (ValueBuffer valueBuffer) => valueBuffer[81]); + (ValueBuffer valueBuffer) => valueBuffer[87]); enumU8Collection.SetPropertyIndexes( - index: 81, - originalValueIndex: 81, + index: 87, + originalValueIndex: 87, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); enumU8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (CompiledModelTestBase.EnumU8 v1, CompiledModelTestBase.EnumU8 v2) => object.Equals((object)v1, (object)v2), (CompiledModelTestBase.EnumU8 v) => v.GetHashCode(), (CompiledModelTestBase.EnumU8 v) => v)), @@ -5310,14 +5974,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 value) => (byte)value, (byte value) => (CompiledModelTestBase.EnumU8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( @@ -5364,12 +6028,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas @float.SetAccessors( (InternalEntityEntry entry) => ReadFloat((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadFloat((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(@float, 82), + (InternalEntityEntry entry) => entry.ReadOriginalValue(@float, 88), (InternalEntityEntry entry) => entry.GetCurrentValue(@float), - (ValueBuffer valueBuffer) => valueBuffer[82]); + (ValueBuffer valueBuffer) => valueBuffer[88]); @float.SetPropertyIndexes( - index: 82, - originalValueIndex: 82, + index: 88, + originalValueIndex: 88, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5405,21 +6069,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas floatArray.SetAccessors( (InternalEntityEntry entry) => ReadFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(floatArray, 83), + (InternalEntityEntry entry) => entry.ReadOriginalValue(floatArray, 89), (InternalEntityEntry entry) => entry.GetCurrentValue(floatArray), - (ValueBuffer valueBuffer) => valueBuffer[83]); + (ValueBuffer valueBuffer) => valueBuffer[89]); floatArray.SetPropertyIndexes( - index: 83, - originalValueIndex: 83, + index: 89, + originalValueIndex: 89, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); floatArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (float v1, float v2) => v1.Equals(v2), (float v) => v.GetHashCode(), (float v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (float v1, float v2) => v1.Equals(v2), (float v) => v.GetHashCode(), (float v) => v)), @@ -5431,10 +6095,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonFloatReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonFloatReaderWriter.Instance), elementMapping: SqlServerFloatTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -5469,12 +6133,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas guid.SetAccessors( (InternalEntityEntry entry) => ReadGuid((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadGuid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(guid, 84), + (InternalEntityEntry entry) => entry.ReadOriginalValue(guid, 90), (InternalEntityEntry entry) => entry.GetCurrentValue(guid), - (ValueBuffer valueBuffer) => valueBuffer[84]); + (ValueBuffer valueBuffer) => valueBuffer[90]); guid.SetPropertyIndexes( - index: 84, - originalValueIndex: 84, + index: 90, + originalValueIndex: 90, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5512,21 +6176,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas guidArray.SetAccessors( (InternalEntityEntry entry) => ReadGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(guidArray, 85), + (InternalEntityEntry entry) => entry.ReadOriginalValue(guidArray, 91), (InternalEntityEntry entry) => entry.GetCurrentValue(guidArray), - (ValueBuffer valueBuffer) => valueBuffer[85]); + (ValueBuffer valueBuffer) => valueBuffer[91]); guidArray.SetPropertyIndexes( - index: 85, - originalValueIndex: 85, + index: 91, + originalValueIndex: 91, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); guidArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (Guid v1, Guid v2) => v1 == v2, (Guid v) => v.GetHashCode(), (Guid v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (Guid v1, Guid v2) => v1 == v2, (Guid v) => v.GetHashCode(), (Guid v) => v)), @@ -5538,10 +6202,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonGuidReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonGuidReaderWriter.Instance), elementMapping: GuidTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -5560,6 +6224,121 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "uniqueidentifier"))); guidArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var guidNestedCollection = runtimeEntityType.AddProperty( + "GuidNestedCollection", + typeof(ICollection), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("GuidNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + guidNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadGuidNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadGuidNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadGuidNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadGuidNestedCollection(instance) == null); + guidNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, ICollection value) => WriteGuidNestedCollection(entity, value)); + guidNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, ICollection value) => WriteGuidNestedCollection(entity, value)); + guidNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(guidNestedCollection, 92), + (InternalEntityEntry entry) => entry.GetCurrentValue>(guidNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[92]); + guidNestedCollection.SetPropertyIndexes( + index: 92, + originalValueIndex: 92, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + guidNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, Guid[][]>(new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v)))), + keyComparer: new ListOfReferenceTypesComparer, Guid[][]>(new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, Guid[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonGuidReaderWriter.Instance)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, Guid[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonGuidReaderWriter.Instance))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonGuidReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonGuidReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + JsonGuidReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonGuidReaderWriter.Instance), + elementMapping: GuidTypeMapping.Default.Clone( + comparer: new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v), + keyComparer: new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v), + providerValueComparer: new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "uniqueidentifier"))))); + guidNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var guidToBytesConverterProperty = runtimeEntityType.AddProperty( "GuidToBytesConverterProperty", typeof(Guid), @@ -5578,12 +6357,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas guidToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadGuidToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadGuidToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(guidToBytesConverterProperty, 86), + (InternalEntityEntry entry) => entry.ReadOriginalValue(guidToBytesConverterProperty, 93), (InternalEntityEntry entry) => entry.GetCurrentValue(guidToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[86]); + (ValueBuffer valueBuffer) => valueBuffer[93]); guidToBytesConverterProperty.SetPropertyIndexes( - index: 86, - originalValueIndex: 86, + index: 93, + originalValueIndex: 93, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5632,12 +6411,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas guidToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadGuidToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadGuidToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(guidToStringConverterProperty, 87), + (InternalEntityEntry entry) => entry.ReadOriginalValue(guidToStringConverterProperty, 94), (InternalEntityEntry entry) => entry.GetCurrentValue(guidToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[87]); + (ValueBuffer valueBuffer) => valueBuffer[94]); guidToStringConverterProperty.SetPropertyIndexes( - index: 87, - originalValueIndex: 87, + index: 94, + originalValueIndex: 94, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5687,12 +6466,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas iPAddress.SetAccessors( (InternalEntityEntry entry) => ReadIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddress, 88), + (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddress, 95), (InternalEntityEntry entry) => entry.GetCurrentValue(iPAddress), - (ValueBuffer valueBuffer) => valueBuffer[88]); + (ValueBuffer valueBuffer) => valueBuffer[95]); iPAddress.SetPropertyIndexes( - index: 88, - originalValueIndex: 88, + index: 95, + originalValueIndex: 95, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5741,21 +6520,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas iPAddressArray.SetAccessors( (InternalEntityEntry entry) => ReadIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressArray, 89), + (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressArray, 96), (InternalEntityEntry entry) => entry.GetCurrentValue(iPAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[89]); + (ValueBuffer valueBuffer) => valueBuffer[96]); iPAddressArray.SetPropertyIndexes( - index: 89, - originalValueIndex: 89, + index: 96, + originalValueIndex: 96, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); iPAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -5767,14 +6546,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -5826,13 +6605,13 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas iPAddressToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadIPAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadIPAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressToBytesConverterProperty, 90), + (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressToBytesConverterProperty, 97), (InternalEntityEntry entry) => entry.GetCurrentValue(iPAddressToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[90]); + (ValueBuffer valueBuffer) => valueBuffer[97]); iPAddressToBytesConverterProperty.SetPropertyIndexes( - index: 90, - originalValueIndex: 90, - shadowIndex: -1, + index: 97, + originalValueIndex: 97, + shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); iPAddressToBytesConverterProperty.TypeMapping = SqlServerByteArrayTypeMapping.Default.Clone( @@ -5879,12 +6658,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas iPAddressToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadIPAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadIPAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressToStringConverterProperty, 91), + (InternalEntityEntry entry) => entry.ReadOriginalValue(iPAddressToStringConverterProperty, 98), (InternalEntityEntry entry) => entry.GetCurrentValue(iPAddressToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[91]); + (ValueBuffer valueBuffer) => valueBuffer[98]); iPAddressToStringConverterProperty.SetPropertyIndexes( - index: 91, - originalValueIndex: 91, + index: 98, + originalValueIndex: 98, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5934,12 +6713,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int16.SetAccessors( (InternalEntityEntry entry) => ReadInt16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int16, 92), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int16, 99), (InternalEntityEntry entry) => entry.GetCurrentValue(int16), - (ValueBuffer valueBuffer) => valueBuffer[92]); + (ValueBuffer valueBuffer) => valueBuffer[99]); int16.SetPropertyIndexes( - index: 92, - originalValueIndex: 92, + index: 99, + originalValueIndex: 99, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -5975,21 +6754,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int16Array.SetAccessors( (InternalEntityEntry entry) => ReadInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int16Array, 93), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int16Array, 100), (InternalEntityEntry entry) => entry.GetCurrentValue(int16Array), - (ValueBuffer valueBuffer) => valueBuffer[93]); + (ValueBuffer valueBuffer) => valueBuffer[100]); int16Array.SetPropertyIndexes( - index: 93, - originalValueIndex: 93, + index: 100, + originalValueIndex: 100, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); int16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), @@ -6001,10 +6780,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonInt16ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -6039,12 +6818,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int32.SetAccessors( (InternalEntityEntry entry) => ReadInt32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int32, 94), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int32, 101), (InternalEntityEntry entry) => entry.GetCurrentValue(int32), - (ValueBuffer valueBuffer) => valueBuffer[94]); + (ValueBuffer valueBuffer) => valueBuffer[101]); int32.SetPropertyIndexes( - index: 94, - originalValueIndex: 94, + index: 101, + originalValueIndex: 101, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6080,21 +6859,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int32Array.SetAccessors( (InternalEntityEntry entry) => ReadInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int32Array, 95), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int32Array, 102), (InternalEntityEntry entry) => entry.GetCurrentValue(int32Array), - (ValueBuffer valueBuffer) => valueBuffer[95]); + (ValueBuffer valueBuffer) => valueBuffer[102]); int32Array.SetPropertyIndexes( - index: 95, - originalValueIndex: 95, + index: 102, + originalValueIndex: 102, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); int32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (int v1, int v2) => v1 == v2, (int v) => v, (int v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (int v1, int v2) => v1 == v2, (int v) => v, (int v) => v)), @@ -6106,10 +6885,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonInt32ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -6126,6 +6905,93 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (int v) => v))); int32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var int32NestedCollection = runtimeEntityType.AddProperty( + "Int32NestedCollection", + typeof(int[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + int32NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadInt32NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadInt32NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadInt32NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadInt32NestedCollection(instance) == null); + int32NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, int[][] value) => WriteInt32NestedCollection(entity, value)); + int32NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, int[][] value) => WriteInt32NestedCollection(entity, value)); + int32NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int32NestedCollection, 103), + (InternalEntityEntry entry) => entry.GetCurrentValue(int32NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[103]); + int32NestedCollection.SetPropertyIndexes( + index: 103, + originalValueIndex: 103, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonInt32ReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + JsonInt32ReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + JsonInt32ReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonInt32ReaderWriter.Instance), + elementMapping: IntTypeMapping.Default.Clone( + comparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v), + keyComparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v), + providerValueComparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v)))); + int32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var int64 = runtimeEntityType.AddProperty( "Int64", typeof(long), @@ -6144,12 +7010,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int64.SetAccessors( (InternalEntityEntry entry) => ReadInt64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int64, 96), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int64, 104), (InternalEntityEntry entry) => entry.GetCurrentValue(int64), - (ValueBuffer valueBuffer) => valueBuffer[96]); + (ValueBuffer valueBuffer) => valueBuffer[104]); int64.SetPropertyIndexes( - index: 96, - originalValueIndex: 96, + index: 104, + originalValueIndex: 104, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6185,21 +7051,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int64Array.SetAccessors( (InternalEntityEntry entry) => ReadInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int64Array, 97), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int64Array, 105), (InternalEntityEntry entry) => entry.GetCurrentValue(int64Array), - (ValueBuffer valueBuffer) => valueBuffer[97]); + (ValueBuffer valueBuffer) => valueBuffer[105]); int64Array.SetPropertyIndexes( - index: 97, - originalValueIndex: 97, + index: 105, + originalValueIndex: 105, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); int64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (long v1, long v2) => v1 == v2, (long v) => v.GetHashCode(), (long v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (long v1, long v2) => v1 == v2, (long v) => v.GetHashCode(), (long v) => v)), @@ -6211,10 +7077,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonInt64ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonInt64ReaderWriter.Instance), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -6231,6 +7097,119 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (long v) => v))); int64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var int64NestedCollection = runtimeEntityType.AddProperty( + "Int64NestedCollection", + typeof(IList[]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + int64NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadInt64NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadInt64NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadInt64NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadInt64NestedCollection(instance) == null); + int64NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, IList[] value) => WriteInt64NestedCollection(entity, value)); + int64NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, IList[] value) => WriteInt64NestedCollection(entity, value)); + int64NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(int64NestedCollection, 106), + (InternalEntityEntry entry) => entry.GetCurrentValue[]>(int64NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[106]); + int64NestedCollection.SetPropertyIndexes( + index: 106, + originalValueIndex: 106, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer[], IList>(new ListOfReferenceTypesComparer, long[]>(new ListOfValueTypesComparer(new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v)))), + keyComparer: new ListOfReferenceTypesComparer[], IList>(new ListOfReferenceTypesComparer, long[]>(new ListOfValueTypesComparer(new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter>(new JsonCollectionOfReferencesReaderWriter[], IList>( + new JsonCollectionOfReferencesReaderWriter, long[]>( + new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter[], IList>( + new JsonCollectionOfReferencesReaderWriter, long[]>( + new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, long[]>(new ListOfValueTypesComparer(new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v))), + keyComparer: new ListOfReferenceTypesComparer, long[]>(new ListOfValueTypesComparer(new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, long[]>( + new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, long[]>( + new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + JsonInt64ReaderWriter.Instance), + elementMapping: SqlServerLongTypeMapping.Default.Clone( + comparer: new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v), + keyComparer: new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v), + providerValueComparer: new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v))))); + int64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var int8 = runtimeEntityType.AddProperty( "Int8", typeof(sbyte), @@ -6248,12 +7227,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int8.SetAccessors( (InternalEntityEntry entry) => ReadInt8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int8, 98), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int8, 107), (InternalEntityEntry entry) => entry.GetCurrentValue(int8), - (ValueBuffer valueBuffer) => valueBuffer[98]); + (ValueBuffer valueBuffer) => valueBuffer[107]); int8.SetPropertyIndexes( - index: 98, - originalValueIndex: 98, + index: 107, + originalValueIndex: 107, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6298,21 +7277,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas int8Array.SetAccessors( (InternalEntityEntry entry) => ReadInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(int8Array, 99), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int8Array, 108), (InternalEntityEntry entry) => entry.GetCurrentValue(int8Array), - (ValueBuffer valueBuffer) => valueBuffer[99]); + (ValueBuffer valueBuffer) => valueBuffer[108]); int8Array.SetPropertyIndexes( - index: 99, - originalValueIndex: 99, + index: 108, + originalValueIndex: 108, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); int8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (sbyte v1, sbyte v2) => v1 == v2, (sbyte v) => (int)v, (sbyte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (sbyte v1, sbyte v2) => v1 == v2, (sbyte v) => (int)v, (sbyte v) => v)), @@ -6324,14 +7303,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (sbyte v) => (short)v, (short v) => (sbyte)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -6360,6 +7339,151 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (short v) => (sbyte)v)))); int8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var int8NestedCollection = runtimeEntityType.AddProperty( + "Int8NestedCollection", + typeof(sbyte[][][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("Int8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + int8NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadInt8NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadInt8NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadInt8NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadInt8NestedCollection(instance) == null); + int8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => WriteInt8NestedCollection(entity, value)); + int8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, sbyte[][][] value) => WriteInt8NestedCollection(entity, value)); + int8NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(int8NestedCollection, 109), + (InternalEntityEntry entry) => entry.GetCurrentValue(int8NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[109]); + int8NestedCollection.SetPropertyIndexes( + index: 109, + originalValueIndex: 109, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + int8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v)))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v))))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfValueTypesComparer(new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfValueTypesComparer(new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v)), + keyComparer: new ListOfValueTypesComparer(new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v))), + elementMapping: SqlServerShortTypeMapping.Default.Clone( + comparer: new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v), + keyComparer: new ValueComparer( + (sbyte v1, sbyte v2) => v1 == v2, + (sbyte v) => (int)v, + (sbyte v) => v), + providerValueComparer: new ValueComparer( + (short v1, short v2) => v1 == v2, + (short v) => (int)v, + (short v) => v), + converter: new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (sbyte v) => (short)v, + (short v) => (sbyte)v)))))); + int8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var intNumberToBytesConverterProperty = runtimeEntityType.AddProperty( "IntNumberToBytesConverterProperty", typeof(int), @@ -6378,12 +7502,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas intNumberToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadIntNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadIntNumberToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(intNumberToBytesConverterProperty, 100), + (InternalEntityEntry entry) => entry.ReadOriginalValue(intNumberToBytesConverterProperty, 110), (InternalEntityEntry entry) => entry.GetCurrentValue(intNumberToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[100]); + (ValueBuffer valueBuffer) => valueBuffer[110]); intNumberToBytesConverterProperty.SetPropertyIndexes( - index: 100, - originalValueIndex: 100, + index: 110, + originalValueIndex: 110, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6432,12 +7556,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas intNumberToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadIntNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadIntNumberToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(intNumberToStringConverterProperty, 101), + (InternalEntityEntry entry) => entry.ReadOriginalValue(intNumberToStringConverterProperty, 111), (InternalEntityEntry entry) => entry.GetCurrentValue(intNumberToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[101]); + (ValueBuffer valueBuffer) => valueBuffer[111]); intNumberToStringConverterProperty.SetPropertyIndexes( - index: 101, - originalValueIndex: 101, + index: 111, + originalValueIndex: 111, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6489,12 +7613,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullIntToNullStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadNullIntToNullStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullIntToNullStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullIntToNullStringConverterProperty, 102), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullIntToNullStringConverterProperty, 112), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullIntToNullStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[102]); + (ValueBuffer valueBuffer) => valueBuffer[112]); nullIntToNullStringConverterProperty.SetPropertyIndexes( - index: 102, - originalValueIndex: 102, + index: 112, + originalValueIndex: 112, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6546,12 +7670,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableBool.SetAccessors( (InternalEntityEntry entry) => ReadNullableBool((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableBool((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableBool, 103), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableBool, 113), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableBool), - (ValueBuffer valueBuffer) => valueBuffer[103]); + (ValueBuffer valueBuffer) => valueBuffer[113]); nullableBool.SetPropertyIndexes( - index: 103, - originalValueIndex: 103, + index: 113, + originalValueIndex: 113, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6587,21 +7711,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableBoolArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableBoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableBoolArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableBoolArray, 104), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableBoolArray, 114), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableBoolArray), - (ValueBuffer valueBuffer) => valueBuffer[104]); + (ValueBuffer valueBuffer) => valueBuffer[114]); nullableBoolArray.SetPropertyIndexes( - index: 104, - originalValueIndex: 104, + index: 114, + originalValueIndex: 114, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableBoolArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (bool)v1 == (bool)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((bool)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(bool)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (bool)v1 == (bool)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((bool)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(bool)v : default(Nullable))), @@ -6613,10 +7737,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonBoolReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonBoolReaderWriter.Instance), elementMapping: SqlServerBoolTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -6651,12 +7775,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableBytes.SetAccessors( (InternalEntityEntry entry) => ReadNullableBytes((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableBytes((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytes, 105), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytes, 115), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableBytes), - (ValueBuffer valueBuffer) => valueBuffer[105]); + (ValueBuffer valueBuffer) => valueBuffer[115]); nullableBytes.SetPropertyIndexes( - index: 105, - originalValueIndex: 105, + index: 115, + originalValueIndex: 115, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6695,21 +7819,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableBytesArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableBytesArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytesArray, 106), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytesArray, 116), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableBytesArray), - (ValueBuffer valueBuffer) => valueBuffer[106]); + (ValueBuffer valueBuffer) => valueBuffer[116]); nullableBytesArray.SetPropertyIndexes( - index: 106, - originalValueIndex: 106, + index: 116, + originalValueIndex: 116, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableBytesArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), (byte[] v) => v.GetHashCode(), (byte[] v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), (byte[] v) => v.GetHashCode(), (byte[] v) => v)), @@ -6721,10 +7845,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( JsonByteArrayReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( JsonByteArrayReaderWriter.Instance), elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -6744,6 +7868,96 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypePostfix: StoreTypePostfix.None)); nullableBytesArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableBytesNestedCollection = runtimeEntityType.AddProperty( + "NullableBytesNestedCollection", + typeof(byte[][][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableBytesNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableBytesNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableBytesNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableBytesNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableBytesNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableBytesNestedCollection(instance) == null); + nullableBytesNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => WriteNullableBytesNestedCollection(entity, value)); + nullableBytesNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, byte[][][] value) => WriteNullableBytesNestedCollection(entity, value)); + nullableBytesNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableBytesNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableBytesNestedCollection, 117), + (InternalEntityEntry entry) => entry.GetCurrentValue(nullableBytesNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[117]); + nullableBytesNestedCollection.SetPropertyIndexes( + index: 117, + originalValueIndex: 117, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableBytesNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v)), + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonByteArrayReaderWriter.Instance), + elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( + comparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v), + keyComparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), + (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), + (byte[] source) => source.ToArray()), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "varbinary(max)"), + storeTypePostfix: StoreTypePostfix.None))); + nullableBytesNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableChar = runtimeEntityType.AddProperty( "NullableChar", typeof(char?), @@ -6762,12 +7976,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableChar.SetAccessors( (InternalEntityEntry entry) => ReadNullableChar((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableChar((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableChar, 107), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableChar, 118), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableChar), - (ValueBuffer valueBuffer) => valueBuffer[107]); + (ValueBuffer valueBuffer) => valueBuffer[118]); nullableChar.SetPropertyIndexes( - index: 107, - originalValueIndex: 107, + index: 118, + originalValueIndex: 118, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6816,21 +8030,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableCharArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableCharArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableCharArray, 108), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableCharArray, 119), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableCharArray), - (ValueBuffer valueBuffer) => valueBuffer[108]); + (ValueBuffer valueBuffer) => valueBuffer[119]); nullableCharArray.SetPropertyIndexes( - index: 108, - originalValueIndex: 108, + index: 119, + originalValueIndex: 119, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableCharArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (char)v1 == (char)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(char)v : 0, (Nullable v) => v.HasValue ? (Nullable)(char)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (char)v1 == (char)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(char)v : 0, (Nullable v) => v.HasValue ? (Nullable)(char)v : default(Nullable))), @@ -6842,14 +8056,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (char v) => string.Format(CultureInfo.InvariantCulture, "{0}", (object)v), (string v) => v.Length < 1 ? '\0' : v[0])))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -6901,12 +8115,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDateOnly.SetAccessors( (InternalEntityEntry entry) => ReadNullableDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDateOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDateOnly, 109), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDateOnly, 120), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableDateOnly), - (ValueBuffer valueBuffer) => valueBuffer[109]); + (ValueBuffer valueBuffer) => valueBuffer[120]); nullableDateOnly.SetPropertyIndexes( - index: 109, - originalValueIndex: 109, + index: 120, + originalValueIndex: 120, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -6942,21 +8156,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDateOnlyArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDateOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDateOnlyArray, 110), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDateOnlyArray, 121), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableDateOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[110]); + (ValueBuffer valueBuffer) => valueBuffer[121]); nullableDateOnlyArray.SetPropertyIndexes( - index: 110, - originalValueIndex: 110, + index: 121, + originalValueIndex: 121, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableDateOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (DateOnly)v1 == (DateOnly)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((DateOnly)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(DateOnly)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (DateOnly)v1 == (DateOnly)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((DateOnly)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(DateOnly)v : default(Nullable))), @@ -6968,10 +8182,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonDateOnlyReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonDateOnlyReaderWriter.Instance), elementMapping: SqlServerDateOnlyTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -7006,12 +8220,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDateTime.SetAccessors( (InternalEntityEntry entry) => ReadNullableDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDateTime((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDateTime, 111), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDateTime, 122), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableDateTime), - (ValueBuffer valueBuffer) => valueBuffer[111]); + (ValueBuffer valueBuffer) => valueBuffer[122]); nullableDateTime.SetPropertyIndexes( - index: 111, - originalValueIndex: 111, + index: 122, + originalValueIndex: 122, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7047,21 +8261,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDateTimeArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDateTimeArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDateTimeArray, 112), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDateTimeArray, 123), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableDateTimeArray), - (ValueBuffer valueBuffer) => valueBuffer[112]); + (ValueBuffer valueBuffer) => valueBuffer[123]); nullableDateTimeArray.SetPropertyIndexes( - index: 112, - originalValueIndex: 112, + index: 123, + originalValueIndex: 123, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableDateTimeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (DateTime)v1 == (DateTime)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((DateTime)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(DateTime)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (DateTime)v1 == (DateTime)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((DateTime)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(DateTime)v : default(Nullable))), @@ -7073,10 +8287,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -7111,12 +8325,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDecimal.SetAccessors( (InternalEntityEntry entry) => ReadNullableDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDecimal((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDecimal, 113), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDecimal, 124), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableDecimal), - (ValueBuffer valueBuffer) => valueBuffer[113]); + (ValueBuffer valueBuffer) => valueBuffer[124]); nullableDecimal.SetPropertyIndexes( - index: 113, - originalValueIndex: 113, + index: 124, + originalValueIndex: 124, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7152,21 +8366,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDecimalArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDecimalArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDecimalArray, 114), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDecimalArray, 125), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableDecimalArray), - (ValueBuffer valueBuffer) => valueBuffer[114]); + (ValueBuffer valueBuffer) => valueBuffer[125]); nullableDecimalArray.SetPropertyIndexes( - index: 114, - originalValueIndex: 114, + index: 125, + originalValueIndex: 125, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableDecimalArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (decimal)v1 == (decimal)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((decimal)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(decimal)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (decimal)v1 == (decimal)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((decimal)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(decimal)v : default(Nullable))), @@ -7178,10 +8392,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonDecimalReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonDecimalReaderWriter.Instance), elementMapping: SqlServerDecimalTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -7216,12 +8430,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDouble.SetAccessors( (InternalEntityEntry entry) => ReadNullableDouble((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDouble((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDouble, 115), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableDouble, 126), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableDouble), - (ValueBuffer valueBuffer) => valueBuffer[115]); + (ValueBuffer valueBuffer) => valueBuffer[126]); nullableDouble.SetPropertyIndexes( - index: 115, - originalValueIndex: 115, + index: 126, + originalValueIndex: 126, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7257,21 +8471,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableDoubleArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableDoubleArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDoubleArray, 116), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableDoubleArray, 127), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableDoubleArray), - (ValueBuffer valueBuffer) => valueBuffer[116]); + (ValueBuffer valueBuffer) => valueBuffer[127]); nullableDoubleArray.SetPropertyIndexes( - index: 116, - originalValueIndex: 116, + index: 127, + originalValueIndex: 127, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableDoubleArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && ((double)v1).Equals((double)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((double)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(double)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && ((double)v1).Equals((double)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((double)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(double)v : default(Nullable))), @@ -7283,10 +8497,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonDoubleReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonDoubleReaderWriter.Instance), elementMapping: SqlServerDoubleTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -7321,12 +8535,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum16.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum16, 117), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum16, 128), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum16), - (ValueBuffer valueBuffer) => valueBuffer[117]); + (ValueBuffer valueBuffer) => valueBuffer[128]); nullableEnum16.SetPropertyIndexes( - index: 117, - originalValueIndex: 117, + index: 128, + originalValueIndex: 128, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7370,21 +8584,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum16Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum16Array, 118), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum16Array, 129), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum16Array), - (ValueBuffer valueBuffer) => valueBuffer[118]); + (ValueBuffer valueBuffer) => valueBuffer[129]); nullableEnum16Array.SetPropertyIndexes( - index: 118, - originalValueIndex: 118, + index: 129, + originalValueIndex: 129, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), @@ -7396,14 +8610,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 value) => (short)value, (short value) => (CompiledModelTestBase.Enum16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -7450,12 +8664,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum16AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum16AsString, 119), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum16AsString, 130), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum16AsString), - (ValueBuffer valueBuffer) => valueBuffer[119]); + (ValueBuffer valueBuffer) => valueBuffer[130]); nullableEnum16AsString.SetPropertyIndexes( - index: 119, - originalValueIndex: 119, + index: 130, + originalValueIndex: 130, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7499,21 +8713,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum16AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum16AsStringArray, 120), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum16AsStringArray, 131), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[120]); + (ValueBuffer valueBuffer) => valueBuffer[131]); nullableEnum16AsStringArray.SetPropertyIndexes( - index: 120, - originalValueIndex: 120, + index: 131, + originalValueIndex: 131, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), @@ -7525,14 +8739,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 value) => (short)value, (short value) => (CompiledModelTestBase.Enum16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -7578,21 +8792,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum16AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum16AsStringCollection, 121), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum16AsStringCollection, 132), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[121]); + (ValueBuffer valueBuffer) => valueBuffer[132]); nullableEnum16AsStringCollection.SetPropertyIndexes( - index: 121, - originalValueIndex: 121, + index: 132, + originalValueIndex: 132, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), @@ -7604,14 +8818,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 value) => (short)value, (short value) => (CompiledModelTestBase.Enum16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -7657,21 +8871,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum16Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum16Collection, 122), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum16Collection, 133), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum16Collection), - (ValueBuffer valueBuffer) => valueBuffer[122]); + (ValueBuffer valueBuffer) => valueBuffer[133]); nullableEnum16Collection.SetPropertyIndexes( - index: 122, - originalValueIndex: 122, + index: 133, + originalValueIndex: 133, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum16)v1, (object)(CompiledModelTestBase.Enum16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum16)v : default(Nullable))), @@ -7683,14 +8897,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum16 value) => (short)value, (short value) => (CompiledModelTestBase.Enum16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum16>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum16>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -7737,12 +8951,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum32.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum32, 123), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum32, 134), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum32), - (ValueBuffer valueBuffer) => valueBuffer[123]); + (ValueBuffer valueBuffer) => valueBuffer[134]); nullableEnum32.SetPropertyIndexes( - index: 123, - originalValueIndex: 123, + index: 134, + originalValueIndex: 134, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7786,21 +9000,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum32Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum32Array, 124), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum32Array, 135), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum32Array), - (ValueBuffer valueBuffer) => valueBuffer[124]); + (ValueBuffer valueBuffer) => valueBuffer[135]); nullableEnum32Array.SetPropertyIndexes( - index: 124, - originalValueIndex: 124, + index: 135, + originalValueIndex: 135, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), @@ -7812,14 +9026,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 value) => (int)value, (int value) => (CompiledModelTestBase.Enum32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -7866,12 +9080,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum32AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum32AsString, 125), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum32AsString, 136), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum32AsString), - (ValueBuffer valueBuffer) => valueBuffer[125]); + (ValueBuffer valueBuffer) => valueBuffer[136]); nullableEnum32AsString.SetPropertyIndexes( - index: 125, - originalValueIndex: 125, + index: 136, + originalValueIndex: 136, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -7915,21 +9129,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum32AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum32AsStringArray, 126), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum32AsStringArray, 137), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[126]); + (ValueBuffer valueBuffer) => valueBuffer[137]); nullableEnum32AsStringArray.SetPropertyIndexes( - index: 126, - originalValueIndex: 126, + index: 137, + originalValueIndex: 137, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), @@ -7941,14 +9155,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 value) => (int)value, (int value) => (CompiledModelTestBase.Enum32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -7994,21 +9208,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum32AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum32AsStringCollection, 127), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum32AsStringCollection, 138), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[127]); + (ValueBuffer valueBuffer) => valueBuffer[138]); nullableEnum32AsStringCollection.SetPropertyIndexes( - index: 127, - originalValueIndex: 127, + index: 138, + originalValueIndex: 138, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), @@ -8020,14 +9234,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 value) => (int)value, (int value) => (CompiledModelTestBase.Enum32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -8073,21 +9287,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum32Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum32Collection, 128), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum32Collection, 139), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum32Collection), - (ValueBuffer valueBuffer) => valueBuffer[128]); + (ValueBuffer valueBuffer) => valueBuffer[139]); nullableEnum32Collection.SetPropertyIndexes( - index: 128, - originalValueIndex: 128, + index: 139, + originalValueIndex: 139, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), @@ -8099,14 +9313,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum32 value) => (int)value, (int value) => (CompiledModelTestBase.Enum32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum32>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum32>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -8135,6 +9349,151 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (int value) => (CompiledModelTestBase.Enum32)value)))); nullableEnum32Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableEnum32NestedCollection = runtimeEntityType.AddProperty( + "NullableEnum32NestedCollection", + typeof(CompiledModelTestBase.Enum32?[][][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum32NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableEnum32NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableEnum32NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableEnum32NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableEnum32NestedCollection(instance) == null); + nullableEnum32NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][][] value) => WriteNullableEnum32NestedCollection(entity, value)); + nullableEnum32NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][][] value) => WriteNullableEnum32NestedCollection(entity, value)); + nullableEnum32NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableEnum32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][][]>(nullableEnum32NestedCollection, 140), + (InternalEntityEntry entry) => entry.GetCurrentValue[][][]>(nullableEnum32NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[140]); + nullableEnum32NestedCollection.SetPropertyIndexes( + index: 140, + originalValueIndex: 140, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value))))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum32)v1, (object)(CompiledModelTestBase.Enum32)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum32)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum32)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value))), + elementMapping: IntTypeMapping.Default.Clone( + comparer: new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v), + keyComparer: new ValueComparer( + (CompiledModelTestBase.Enum32 v1, CompiledModelTestBase.Enum32 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum32 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum32 v) => v), + providerValueComparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v), + converter: new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt32ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum32 value) => (int)value, + (int value) => (CompiledModelTestBase.Enum32)value)))))); + nullableEnum32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableEnum64 = runtimeEntityType.AddProperty( "NullableEnum64", typeof(CompiledModelTestBase.Enum64?), @@ -8153,12 +9512,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum64.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum64, 129), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum64, 141), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum64), - (ValueBuffer valueBuffer) => valueBuffer[129]); + (ValueBuffer valueBuffer) => valueBuffer[141]); nullableEnum64.SetPropertyIndexes( - index: 129, - originalValueIndex: 129, + index: 141, + originalValueIndex: 141, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -8202,21 +9561,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum64Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum64Array, 130), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum64Array, 142), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum64Array), - (ValueBuffer valueBuffer) => valueBuffer[130]); + (ValueBuffer valueBuffer) => valueBuffer[142]); nullableEnum64Array.SetPropertyIndexes( - index: 130, - originalValueIndex: 130, + index: 142, + originalValueIndex: 142, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), @@ -8228,14 +9587,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 value) => (long)value, (long value) => (CompiledModelTestBase.Enum64)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -8282,12 +9641,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum64AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum64AsString, 131), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum64AsString, 143), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum64AsString), - (ValueBuffer valueBuffer) => valueBuffer[131]); + (ValueBuffer valueBuffer) => valueBuffer[143]); nullableEnum64AsString.SetPropertyIndexes( - index: 131, - originalValueIndex: 131, + index: 143, + originalValueIndex: 143, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -8331,21 +9690,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum64AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum64AsStringArray, 132), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum64AsStringArray, 144), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[132]); + (ValueBuffer valueBuffer) => valueBuffer[144]); nullableEnum64AsStringArray.SetPropertyIndexes( - index: 132, - originalValueIndex: 132, + index: 144, + originalValueIndex: 144, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), @@ -8357,14 +9716,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 value) => (long)value, (long value) => (CompiledModelTestBase.Enum64)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -8410,21 +9769,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum64AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum64AsStringCollection, 133), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum64AsStringCollection, 145), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[133]); + (ValueBuffer valueBuffer) => valueBuffer[145]); nullableEnum64AsStringCollection.SetPropertyIndexes( - index: 133, - originalValueIndex: 133, + index: 145, + originalValueIndex: 145, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), @@ -8436,14 +9795,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 value) => (long)value, (long value) => (CompiledModelTestBase.Enum64)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -8489,21 +9848,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum64Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum64Collection, 134), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum64Collection, 146), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum64Collection), - (ValueBuffer valueBuffer) => valueBuffer[134]); + (ValueBuffer valueBuffer) => valueBuffer[146]); nullableEnum64Collection.SetPropertyIndexes( - index: 134, - originalValueIndex: 134, + index: 146, + originalValueIndex: 146, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum64)v1, (object)(CompiledModelTestBase.Enum64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum64)v : default(Nullable))), @@ -8515,14 +9874,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum64 value) => (long)value, (long value) => (CompiledModelTestBase.Enum64)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum64>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum64>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -8569,12 +9928,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum8.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum8, 135), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum8, 147), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum8), - (ValueBuffer valueBuffer) => valueBuffer[135]); + (ValueBuffer valueBuffer) => valueBuffer[147]); nullableEnum8.SetPropertyIndexes( - index: 135, - originalValueIndex: 135, + index: 147, + originalValueIndex: 147, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -8618,21 +9977,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum8Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum8Array, 136), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum8Array, 148), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum8Array), - (ValueBuffer valueBuffer) => valueBuffer[136]); + (ValueBuffer valueBuffer) => valueBuffer[148]); nullableEnum8Array.SetPropertyIndexes( - index: 136, - originalValueIndex: 136, + index: 148, + originalValueIndex: 148, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), @@ -8644,14 +10003,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 value) => (short)value, (short value) => (CompiledModelTestBase.Enum8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -8698,12 +10057,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum8AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum8AsString, 137), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnum8AsString, 149), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnum8AsString), - (ValueBuffer valueBuffer) => valueBuffer[137]); + (ValueBuffer valueBuffer) => valueBuffer[149]); nullableEnum8AsString.SetPropertyIndexes( - index: 137, - originalValueIndex: 137, + index: 149, + originalValueIndex: 149, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -8747,21 +10106,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum8AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum8AsStringArray, 138), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnum8AsStringArray, 150), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnum8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[138]); + (ValueBuffer valueBuffer) => valueBuffer[150]); nullableEnum8AsStringArray.SetPropertyIndexes( - index: 138, - originalValueIndex: 138, + index: 150, + originalValueIndex: 150, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), @@ -8773,14 +10132,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 value) => (short)value, (short value) => (CompiledModelTestBase.Enum8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -8826,21 +10185,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum8AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum8AsStringCollection, 139), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum8AsStringCollection, 151), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[139]); + (ValueBuffer valueBuffer) => valueBuffer[151]); nullableEnum8AsStringCollection.SetPropertyIndexes( - index: 139, - originalValueIndex: 139, + index: 151, + originalValueIndex: 151, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), @@ -8852,14 +10211,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 value) => (short)value, (short value) => (CompiledModelTestBase.Enum8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -8905,21 +10264,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnum8Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnum8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum8Collection, 140), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnum8Collection, 152), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnum8Collection), - (ValueBuffer valueBuffer) => valueBuffer[140]); + (ValueBuffer valueBuffer) => valueBuffer[152]); nullableEnum8Collection.SetPropertyIndexes( - index: 140, - originalValueIndex: 140, + index: 152, + originalValueIndex: 152, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnum8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.Enum8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), @@ -8931,14 +10290,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.Enum8 value) => (short)value, (short value) => (CompiledModelTestBase.Enum8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.Enum8>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.Enum8>( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -8967,6 +10326,117 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (short value) => (CompiledModelTestBase.Enum8)value)))); nullableEnum8Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableEnum8NestedCollection = runtimeEntityType.AddProperty( + "NullableEnum8NestedCollection", + typeof(CompiledModelTestBase.Enum8?[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnum8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnum8NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableEnum8NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableEnum8NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableEnum8NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableEnum8NestedCollection(instance) == null); + nullableEnum8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableEnum8NestedCollection(entity, value)); + nullableEnum8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableEnum8NestedCollection(entity, value)); + nullableEnum8NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableEnum8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(nullableEnum8NestedCollection, 153), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(nullableEnum8NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[153]); + nullableEnum8NestedCollection.SetPropertyIndexes( + index: 153, + originalValueIndex: 153, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnum8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.Enum8)v1, (object)(CompiledModelTestBase.Enum8)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.Enum8)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.Enum8)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value))), + elementMapping: SqlServerShortTypeMapping.Default.Clone( + comparer: new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v), + keyComparer: new ValueComparer( + (CompiledModelTestBase.Enum8 v1, CompiledModelTestBase.Enum8 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.Enum8 v) => v.GetHashCode(), + (CompiledModelTestBase.Enum8 v) => v), + providerValueComparer: new ValueComparer( + (short v1, short v2) => v1 == v2, + (short v) => (int)v, + (short v) => v), + converter: new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonInt16ReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.Enum8 value) => (short)value, + (short value) => (CompiledModelTestBase.Enum8)value))))); + nullableEnum8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableEnumU16 = runtimeEntityType.AddProperty( "NullableEnumU16", typeof(CompiledModelTestBase.EnumU16?), @@ -8985,12 +10455,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU16.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU16, 141), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU16, 154), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU16), - (ValueBuffer valueBuffer) => valueBuffer[141]); + (ValueBuffer valueBuffer) => valueBuffer[154]); nullableEnumU16.SetPropertyIndexes( - index: 141, - originalValueIndex: 141, + index: 154, + originalValueIndex: 154, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -9034,21 +10504,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU16Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU16Array, 142), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU16Array, 155), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU16Array), - (ValueBuffer valueBuffer) => valueBuffer[142]); + (ValueBuffer valueBuffer) => valueBuffer[155]); nullableEnumU16Array.SetPropertyIndexes( - index: 142, - originalValueIndex: 142, + index: 155, + originalValueIndex: 155, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), @@ -9060,14 +10530,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 value) => (int)value, (int value) => (CompiledModelTestBase.EnumU16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -9114,12 +10584,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU16AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU16AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU16AsString, 143), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU16AsString, 156), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU16AsString), - (ValueBuffer valueBuffer) => valueBuffer[143]); + (ValueBuffer valueBuffer) => valueBuffer[156]); nullableEnumU16AsString.SetPropertyIndexes( - index: 143, - originalValueIndex: 143, + index: 156, + originalValueIndex: 156, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -9163,21 +10633,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU16AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU16AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU16AsStringArray, 144), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU16AsStringArray, 157), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU16AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[144]); + (ValueBuffer valueBuffer) => valueBuffer[157]); nullableEnumU16AsStringArray.SetPropertyIndexes( - index: 144, - originalValueIndex: 144, + index: 157, + originalValueIndex: 157, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU16AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), @@ -9189,14 +10659,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 value) => (int)value, (int value) => (CompiledModelTestBase.EnumU16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -9242,21 +10712,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU16AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU16AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU16AsStringCollection, 145), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU16AsStringCollection, 158), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU16AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[145]); + (ValueBuffer valueBuffer) => valueBuffer[158]); nullableEnumU16AsStringCollection.SetPropertyIndexes( - index: 145, - originalValueIndex: 145, + index: 158, + originalValueIndex: 158, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU16AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), @@ -9268,14 +10738,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 value) => (int)value, (int value) => (CompiledModelTestBase.EnumU16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -9321,21 +10791,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU16Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU16Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU16Collection, 146), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU16Collection, 159), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU16Collection), - (ValueBuffer valueBuffer) => valueBuffer[146]); + (ValueBuffer valueBuffer) => valueBuffer[159]); nullableEnumU16Collection.SetPropertyIndexes( - index: 146, - originalValueIndex: 146, + index: 159, + originalValueIndex: 159, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU16Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU16>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU16)v1, (object)(CompiledModelTestBase.EnumU16)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU16)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU16)v : default(Nullable))), @@ -9347,14 +10817,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU16 value) => (int)value, (int value) => (CompiledModelTestBase.EnumU16)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU16>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU16>( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -9401,12 +10871,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU32.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU32, 147), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU32, 160), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU32), - (ValueBuffer valueBuffer) => valueBuffer[147]); + (ValueBuffer valueBuffer) => valueBuffer[160]); nullableEnumU32.SetPropertyIndexes( - index: 147, - originalValueIndex: 147, + index: 160, + originalValueIndex: 160, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -9450,21 +10920,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU32Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU32Array, 148), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU32Array, 161), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU32Array), - (ValueBuffer valueBuffer) => valueBuffer[148]); + (ValueBuffer valueBuffer) => valueBuffer[161]); nullableEnumU32Array.SetPropertyIndexes( - index: 148, - originalValueIndex: 148, + index: 161, + originalValueIndex: 161, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), @@ -9476,14 +10946,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 value) => (long)value, (long value) => (CompiledModelTestBase.EnumU32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -9530,12 +11000,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU32AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU32AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU32AsString, 149), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU32AsString, 162), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU32AsString), - (ValueBuffer valueBuffer) => valueBuffer[149]); + (ValueBuffer valueBuffer) => valueBuffer[162]); nullableEnumU32AsString.SetPropertyIndexes( - index: 149, - originalValueIndex: 149, + index: 162, + originalValueIndex: 162, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -9579,21 +11049,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU32AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU32AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU32AsStringArray, 150), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU32AsStringArray, 163), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU32AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[150]); + (ValueBuffer valueBuffer) => valueBuffer[163]); nullableEnumU32AsStringArray.SetPropertyIndexes( - index: 150, - originalValueIndex: 150, + index: 163, + originalValueIndex: 163, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU32AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), @@ -9605,14 +11075,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 value) => (long)value, (long value) => (CompiledModelTestBase.EnumU32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -9658,21 +11128,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU32AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU32AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU32AsStringCollection, 151), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU32AsStringCollection, 164), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU32AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[151]); + (ValueBuffer valueBuffer) => valueBuffer[164]); nullableEnumU32AsStringCollection.SetPropertyIndexes( - index: 151, - originalValueIndex: 151, + index: 164, + originalValueIndex: 164, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU32AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), @@ -9684,14 +11154,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 value) => (long)value, (long value) => (CompiledModelTestBase.EnumU32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -9737,21 +11207,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU32Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU32Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU32Collection, 152), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU32Collection, 165), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU32Collection), - (ValueBuffer valueBuffer) => valueBuffer[152]); + (ValueBuffer valueBuffer) => valueBuffer[165]); nullableEnumU32Collection.SetPropertyIndexes( - index: 152, - originalValueIndex: 152, + index: 165, + originalValueIndex: 165, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU32Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU32>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU32)v1, (object)(CompiledModelTestBase.EnumU32)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU32)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU32)v : default(Nullable))), @@ -9763,14 +11233,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU32 value) => (long)value, (long value) => (CompiledModelTestBase.EnumU32)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU32>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU32>( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -9817,12 +11287,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU64.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU64, 153), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU64, 166), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU64), - (ValueBuffer valueBuffer) => valueBuffer[153]); + (ValueBuffer valueBuffer) => valueBuffer[166]); nullableEnumU64.SetPropertyIndexes( - index: 153, - originalValueIndex: 153, + index: 166, + originalValueIndex: 166, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -9870,21 +11340,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU64Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU64Array, 154), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU64Array, 167), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU64Array), - (ValueBuffer valueBuffer) => valueBuffer[154]); + (ValueBuffer valueBuffer) => valueBuffer[167]); nullableEnumU64Array.SetPropertyIndexes( - index: 154, - originalValueIndex: 154, + index: 167, + originalValueIndex: 167, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), @@ -9896,14 +11366,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -9954,12 +11424,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU64AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU64AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU64AsString, 155), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU64AsString, 168), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU64AsString), - (ValueBuffer valueBuffer) => valueBuffer[155]); + (ValueBuffer valueBuffer) => valueBuffer[168]); nullableEnumU64AsString.SetPropertyIndexes( - index: 155, - originalValueIndex: 155, + index: 168, + originalValueIndex: 168, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -10007,21 +11477,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU64AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU64AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU64AsStringArray, 156), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU64AsStringArray, 169), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU64AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[156]); + (ValueBuffer valueBuffer) => valueBuffer[169]); nullableEnumU64AsStringArray.SetPropertyIndexes( - index: 156, - originalValueIndex: 156, + index: 169, + originalValueIndex: 169, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU64AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), @@ -10033,14 +11503,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -10090,21 +11560,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU64AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU64AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU64AsStringCollection, 157), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU64AsStringCollection, 170), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU64AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[157]); + (ValueBuffer valueBuffer) => valueBuffer[170]); nullableEnumU64AsStringCollection.SetPropertyIndexes( - index: 157, - originalValueIndex: 157, + index: 170, + originalValueIndex: 170, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU64AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), @@ -10116,14 +11586,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -10173,21 +11643,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU64Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU64Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU64Collection, 158), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU64Collection, 171), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU64Collection), - (ValueBuffer valueBuffer) => valueBuffer[158]); + (ValueBuffer valueBuffer) => valueBuffer[171]); nullableEnumU64Collection.SetPropertyIndexes( - index: 158, - originalValueIndex: 158, + index: 171, + originalValueIndex: 171, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU64Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU64>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), @@ -10199,14 +11669,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU64>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU64>( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -10239,6 +11709,121 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))); nullableEnumU64Collection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableEnumU64NestedCollection = runtimeEntityType.AddProperty( + "NullableEnumU64NestedCollection", + typeof(CompiledModelTestBase.EnumU64?[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableEnumU64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableEnumU64NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableEnumU64NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableEnumU64NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableEnumU64NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableEnumU64NestedCollection(instance) == null); + nullableEnumU64NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableEnumU64NestedCollection(entity, value)); + nullableEnumU64NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableEnumU64NestedCollection(entity, value)); + nullableEnumU64NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableEnumU64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(nullableEnumU64NestedCollection, 172), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(nullableEnumU64NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[172]); + nullableEnumU64NestedCollection.SetPropertyIndexes( + index: 172, + originalValueIndex: 172, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableEnumU64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU64)v1, (object)(CompiledModelTestBase.EnumU64)v2) || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU64)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU64)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))), + elementMapping: SqlServerDecimalTypeMapping.Default.Clone( + comparer: new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v), + keyComparer: new ValueComparer( + (CompiledModelTestBase.EnumU64 v1, CompiledModelTestBase.EnumU64 v2) => object.Equals((object)v1, (object)v2), + (CompiledModelTestBase.EnumU64 v) => v.GetHashCode(), + (CompiledModelTestBase.EnumU64 v) => v), + providerValueComparer: new ValueComparer( + (decimal v1, decimal v2) => v1 == v2, + (decimal v) => v.GetHashCode(), + (decimal v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "decimal(20,0)", + precision: 20, + scale: 0), + converter: new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonDecimalReaderWriter.Instance, + new ValueConverter( + (CompiledModelTestBase.EnumU64 value) => (decimal)(long)value, + (decimal value) => (CompiledModelTestBase.EnumU64)(long)value))))); + nullableEnumU64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableEnumU8 = runtimeEntityType.AddProperty( "NullableEnumU8", typeof(CompiledModelTestBase.EnumU8?), @@ -10257,12 +11842,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU8.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU8, 159), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU8, 173), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU8), - (ValueBuffer valueBuffer) => valueBuffer[159]); + (ValueBuffer valueBuffer) => valueBuffer[173]); nullableEnumU8.SetPropertyIndexes( - index: 159, - originalValueIndex: 159, + index: 173, + originalValueIndex: 173, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -10306,21 +11891,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU8Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU8Array, 160), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU8Array, 174), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU8Array), - (ValueBuffer valueBuffer) => valueBuffer[160]); + (ValueBuffer valueBuffer) => valueBuffer[174]); nullableEnumU8Array.SetPropertyIndexes( - index: 160, - originalValueIndex: 160, + index: 174, + originalValueIndex: 174, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), @@ -10332,14 +11917,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 value) => (byte)value, (byte value) => (CompiledModelTestBase.EnumU8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( @@ -10386,12 +11971,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU8AsString.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU8AsString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU8AsString, 161), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableEnumU8AsString, 175), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableEnumU8AsString), - (ValueBuffer valueBuffer) => valueBuffer[161]); + (ValueBuffer valueBuffer) => valueBuffer[175]); nullableEnumU8AsString.SetPropertyIndexes( - index: 161, - originalValueIndex: 161, + index: 175, + originalValueIndex: 175, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -10435,21 +12020,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU8AsStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU8AsStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU8AsStringArray, 162), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableEnumU8AsStringArray, 176), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableEnumU8AsStringArray), - (ValueBuffer valueBuffer) => valueBuffer[162]); + (ValueBuffer valueBuffer) => valueBuffer[176]); nullableEnumU8AsStringArray.SetPropertyIndexes( - index: 162, - originalValueIndex: 162, + index: 176, + originalValueIndex: 176, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU8AsStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), @@ -10461,14 +12046,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 value) => (byte)value, (byte value) => (CompiledModelTestBase.EnumU8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( @@ -10514,21 +12099,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU8AsStringCollection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU8AsStringCollection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU8AsStringCollection, 163), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU8AsStringCollection, 177), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU8AsStringCollection), - (ValueBuffer valueBuffer) => valueBuffer[163]); + (ValueBuffer valueBuffer) => valueBuffer[177]); nullableEnumU8AsStringCollection.SetPropertyIndexes( - index: 163, - originalValueIndex: 163, + index: 177, + originalValueIndex: 177, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU8AsStringCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), @@ -10540,14 +12125,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 value) => (byte)value, (byte value) => (CompiledModelTestBase.EnumU8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( @@ -10593,21 +12178,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableEnumU8Collection.SetAccessors( (InternalEntityEntry entry) => ReadNullableEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableEnumU8Collection((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU8Collection, 164), + (InternalEntityEntry entry) => entry.ReadOriginalValue>>(nullableEnumU8Collection, 178), (InternalEntityEntry entry) => entry.GetCurrentValue>>(nullableEnumU8Collection), - (ValueBuffer valueBuffer) => valueBuffer[164]); + (ValueBuffer valueBuffer) => valueBuffer[178]); nullableEnumU8Collection.SetPropertyIndexes( - index: 164, - originalValueIndex: 164, + index: 178, + originalValueIndex: 178, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableEnumU8Collection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer, CompiledModelTestBase.EnumU8>(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && object.Equals((object)(CompiledModelTestBase.EnumU8)v1, (object)(CompiledModelTestBase.EnumU8)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((CompiledModelTestBase.EnumU8)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(CompiledModelTestBase.EnumU8)v : default(Nullable))), @@ -10619,14 +12204,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( (CompiledModelTestBase.EnumU8 value) => (byte)value, (byte value) => (CompiledModelTestBase.EnumU8)value)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter, List, CompiledModelTestBase.EnumU8>( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter, CompiledModelTestBase.EnumU8>( new JsonConvertedValueReaderWriter( JsonByteReaderWriter.Instance, new ValueConverter( @@ -10673,12 +12258,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableFloat.SetAccessors( (InternalEntityEntry entry) => ReadNullableFloat((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableFloat((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableFloat, 165), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableFloat, 179), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableFloat), - (ValueBuffer valueBuffer) => valueBuffer[165]); + (ValueBuffer valueBuffer) => valueBuffer[179]); nullableFloat.SetPropertyIndexes( - index: 165, - originalValueIndex: 165, + index: 179, + originalValueIndex: 179, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -10714,21 +12299,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableFloatArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableFloatArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableFloatArray, 166), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableFloatArray, 180), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableFloatArray), - (ValueBuffer valueBuffer) => valueBuffer[166]); + (ValueBuffer valueBuffer) => valueBuffer[180]); nullableFloatArray.SetPropertyIndexes( - index: 166, - originalValueIndex: 166, + index: 180, + originalValueIndex: 180, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableFloatArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && ((float)v1).Equals((float)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((float)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(float)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && ((float)v1).Equals((float)v2) || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((float)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(float)v : default(Nullable))), @@ -10740,10 +12325,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonFloatReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonFloatReaderWriter.Instance), elementMapping: SqlServerFloatTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -10778,12 +12363,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableGuid.SetAccessors( (InternalEntityEntry entry) => ReadNullableGuid((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableGuid((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableGuid, 167), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableGuid, 181), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableGuid), - (ValueBuffer valueBuffer) => valueBuffer[167]); + (ValueBuffer valueBuffer) => valueBuffer[181]); nullableGuid.SetPropertyIndexes( - index: 167, - originalValueIndex: 167, + index: 181, + originalValueIndex: 181, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -10821,21 +12406,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableGuidArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableGuidArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableGuidArray, 168), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableGuidArray, 182), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableGuidArray), - (ValueBuffer valueBuffer) => valueBuffer[168]); + (ValueBuffer valueBuffer) => valueBuffer[182]); nullableGuidArray.SetPropertyIndexes( - index: 168, - originalValueIndex: 168, + index: 182, + originalValueIndex: 182, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableGuidArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (Guid)v1 == (Guid)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((Guid)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(Guid)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (Guid)v1 == (Guid)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((Guid)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(Guid)v : default(Nullable))), @@ -10847,10 +12432,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonGuidReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonGuidReaderWriter.Instance), elementMapping: GuidTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -10869,6 +12454,95 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "uniqueidentifier"))); nullableGuidArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableGuidNestedCollection = runtimeEntityType.AddProperty( + "NullableGuidNestedCollection", + typeof(Guid?[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableGuidNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableGuidNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableGuidNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableGuidNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableGuidNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableGuidNestedCollection(instance) == null); + nullableGuidNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableGuidNestedCollection(entity, value)); + nullableGuidNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableGuidNestedCollection(entity, value)); + nullableGuidNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableGuidNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(nullableGuidNestedCollection, 183), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(nullableGuidNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[183]); + nullableGuidNestedCollection.SetPropertyIndexes( + index: 183, + originalValueIndex: 183, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableGuidNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (Guid)v1 == (Guid)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((Guid)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(Guid)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (Guid)v1 == (Guid)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((Guid)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(Guid)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonGuidReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonGuidReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (Guid)v1 == (Guid)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((Guid)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(Guid)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (Guid)v1 == (Guid)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((Guid)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(Guid)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + JsonGuidReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonGuidReaderWriter.Instance), + elementMapping: GuidTypeMapping.Default.Clone( + comparer: new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v), + keyComparer: new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v), + providerValueComparer: new ValueComparer( + (Guid v1, Guid v2) => v1 == v2, + (Guid v) => v.GetHashCode(), + (Guid v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "uniqueidentifier")))); + nullableGuidNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableIPAddress = runtimeEntityType.AddProperty( "NullableIPAddress", typeof(IPAddress), @@ -10887,12 +12561,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableIPAddress.SetAccessors( (InternalEntityEntry entry) => ReadNullableIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableIPAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableIPAddress, 169), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableIPAddress, 184), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableIPAddress), - (ValueBuffer valueBuffer) => valueBuffer[169]); + (ValueBuffer valueBuffer) => valueBuffer[184]); nullableIPAddress.SetPropertyIndexes( - index: 169, - originalValueIndex: 169, + index: 184, + originalValueIndex: 184, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -10941,21 +12615,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableIPAddressArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableIPAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableIPAddressArray, 170), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableIPAddressArray, 185), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableIPAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[170]); + (ValueBuffer valueBuffer) => valueBuffer[185]); nullableIPAddressArray.SetPropertyIndexes( - index: 170, - originalValueIndex: 170, + index: 185, + originalValueIndex: 185, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableIPAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -10967,14 +12641,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -11026,12 +12700,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt16.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt16, 171), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt16, 186), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableInt16), - (ValueBuffer valueBuffer) => valueBuffer[171]); + (ValueBuffer valueBuffer) => valueBuffer[186]); nullableInt16.SetPropertyIndexes( - index: 171, - originalValueIndex: 171, + index: 186, + originalValueIndex: 186, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11067,21 +12741,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt16Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt16Array, 172), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt16Array, 187), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[172]); + (ValueBuffer valueBuffer) => valueBuffer[187]); nullableInt16Array.SetPropertyIndexes( - index: 172, - originalValueIndex: 172, + index: 187, + originalValueIndex: 187, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableInt16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (short)v1 == (short)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(short)v : 0, (Nullable v) => v.HasValue ? (Nullable)(short)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (short)v1 == (short)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(short)v : 0, (Nullable v) => v.HasValue ? (Nullable)(short)v : default(Nullable))), @@ -11093,10 +12767,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonInt16ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -11131,12 +12805,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt32.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt32, 173), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt32, 188), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableInt32), - (ValueBuffer valueBuffer) => valueBuffer[173]); + (ValueBuffer valueBuffer) => valueBuffer[188]); nullableInt32.SetPropertyIndexes( - index: 173, - originalValueIndex: 173, + index: 188, + originalValueIndex: 188, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11172,21 +12846,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt32Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt32Array, 174), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt32Array, 189), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[174]); + (ValueBuffer valueBuffer) => valueBuffer[189]); nullableInt32Array.SetPropertyIndexes( - index: 174, - originalValueIndex: 174, + index: 189, + originalValueIndex: 189, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableInt32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (int)v1 == (int)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)v : 0, (Nullable v) => v.HasValue ? (Nullable)(int)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (int)v1 == (int)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)v : 0, (Nullable v) => v.HasValue ? (Nullable)(int)v : default(Nullable))), @@ -11198,10 +12872,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonInt32ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonInt32ReaderWriter.Instance), elementMapping: IntTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -11218,6 +12892,93 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (int v) => v))); nullableInt32Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableInt32NestedCollection = runtimeEntityType.AddProperty( + "NullableInt32NestedCollection", + typeof(int?[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt32NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableInt32NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableInt32NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableInt32NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableInt32NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableInt32NestedCollection(instance) == null); + nullableInt32NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableInt32NestedCollection(entity, value)); + nullableInt32NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableInt32NestedCollection(entity, value)); + nullableInt32NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableInt32NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(nullableInt32NestedCollection, 190), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(nullableInt32NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[190]); + nullableInt32NestedCollection.SetPropertyIndexes( + index: 190, + originalValueIndex: 190, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt32NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (int)v1 == (int)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(int)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (int)v1 == (int)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(int)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt32ReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt32ReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (int)v1 == (int)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(int)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (int)v1 == (int)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(int)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + JsonInt32ReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonInt32ReaderWriter.Instance), + elementMapping: IntTypeMapping.Default.Clone( + comparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v), + keyComparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v), + providerValueComparer: new ValueComparer( + (int v1, int v2) => v1 == v2, + (int v) => v, + (int v) => v)))); + nullableInt32NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableInt64 = runtimeEntityType.AddProperty( "NullableInt64", typeof(long?), @@ -11236,12 +12997,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt64.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt64, 175), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt64, 191), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableInt64), - (ValueBuffer valueBuffer) => valueBuffer[175]); + (ValueBuffer valueBuffer) => valueBuffer[191]); nullableInt64.SetPropertyIndexes( - index: 175, - originalValueIndex: 175, + index: 191, + originalValueIndex: 191, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11277,21 +13038,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt64Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt64Array, 176), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt64Array, 192), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[176]); + (ValueBuffer valueBuffer) => valueBuffer[192]); nullableInt64Array.SetPropertyIndexes( - index: 176, - originalValueIndex: 176, + index: 192, + originalValueIndex: 192, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableInt64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable))), @@ -11303,10 +13064,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonInt64ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonInt64ReaderWriter.Instance), elementMapping: SqlServerLongTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -11323,6 +13084,119 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (long v) => v))); nullableInt64Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableInt64NestedCollection = runtimeEntityType.AddProperty( + "NullableInt64NestedCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableInt64NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableInt64NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableInt64NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableInt64NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableInt64NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableInt64NestedCollection(instance) == null); + nullableInt64NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List[][]> value) => WriteNullableInt64NestedCollection(entity, value)); + nullableInt64NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List[][]> value) => WriteNullableInt64NestedCollection(entity, value)); + nullableInt64NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableInt64NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>>(nullableInt64NestedCollection, 193), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>>(nullableInt64NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[193]); + nullableInt64NestedCollection.SetPropertyIndexes( + index: 193, + originalValueIndex: 193, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableInt64NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, long?[][]>(new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable))))), + keyComparer: new ListOfReferenceTypesComparer, long?[][]>(new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable))))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, long?[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance)))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, long?[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (long)v1 == (long)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? ((long)v).GetHashCode() : 0, + (Nullable v) => v.HasValue ? (Nullable)(long)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonInt64ReaderWriter.Instance), + elementMapping: SqlServerLongTypeMapping.Default.Clone( + comparer: new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v), + keyComparer: new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v), + providerValueComparer: new ValueComparer( + (long v1, long v2) => v1 == v2, + (long v) => v.GetHashCode(), + (long v) => v))))); + nullableInt64NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableInt8 = runtimeEntityType.AddProperty( "NullableInt8", typeof(sbyte?), @@ -11341,12 +13215,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt8.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt8, 177), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableInt8, 194), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableInt8), - (ValueBuffer valueBuffer) => valueBuffer[177]); + (ValueBuffer valueBuffer) => valueBuffer[194]); nullableInt8.SetPropertyIndexes( - index: 177, - originalValueIndex: 177, + index: 194, + originalValueIndex: 194, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11390,21 +13264,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableInt8Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt8Array, 178), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableInt8Array, 195), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[178]); + (ValueBuffer valueBuffer) => valueBuffer[195]); nullableInt8Array.SetPropertyIndexes( - index: 178, - originalValueIndex: 178, + index: 195, + originalValueIndex: 195, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableInt8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (sbyte)v1 == (sbyte)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(sbyte)v : 0, (Nullable v) => v.HasValue ? (Nullable)(sbyte)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (sbyte)v1 == (sbyte)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(sbyte)v : 0, (Nullable v) => v.HasValue ? (Nullable)(sbyte)v : default(Nullable))), @@ -11416,14 +13290,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( (sbyte v) => (short)v, (short v) => (sbyte)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt16ReaderWriter.Instance, new ValueConverter( @@ -11470,12 +13344,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullablePhysicalAddress.SetAccessors( (InternalEntityEntry entry) => ReadNullablePhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullablePhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullablePhysicalAddress, 179), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullablePhysicalAddress, 196), (InternalEntityEntry entry) => entry.GetCurrentValue(nullablePhysicalAddress), - (ValueBuffer valueBuffer) => valueBuffer[179]); + (ValueBuffer valueBuffer) => valueBuffer[196]); nullablePhysicalAddress.SetPropertyIndexes( - index: 179, - originalValueIndex: 179, + index: 196, + originalValueIndex: 196, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11524,21 +13398,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullablePhysicalAddressArray.SetAccessors( (InternalEntityEntry entry) => ReadNullablePhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullablePhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullablePhysicalAddressArray, 180), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullablePhysicalAddressArray, 197), (InternalEntityEntry entry) => entry.GetCurrentValue(nullablePhysicalAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[180]); + (ValueBuffer valueBuffer) => valueBuffer[197]); nullablePhysicalAddressArray.SetPropertyIndexes( - index: 180, - originalValueIndex: 180, + index: 197, + originalValueIndex: 197, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullablePhysicalAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), (PhysicalAddress v) => v.GetHashCode(), (PhysicalAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), (PhysicalAddress v) => v.GetHashCode(), (PhysicalAddress v) => v)), @@ -11550,46 +13424,196 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (PhysicalAddress v) => v.ToString(), (string v) => PhysicalAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( - new JsonConvertedValueReaderWriter( - JsonStringReaderWriter.Instance, - new ValueConverter( - (PhysicalAddress v) => v.ToString(), - (string v) => PhysicalAddress.Parse(v)))), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v), + keyComparer: new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(20)", + size: 20, + unicode: true, + dbType: System.Data.DbType.String), + converter: new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v))))); + nullablePhysicalAddressArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + + var nullablePhysicalAddressNestedCollection = runtimeEntityType.AddProperty( + "NullablePhysicalAddressNestedCollection", + typeof(IEnumerable), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullablePhysicalAddressNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullablePhysicalAddressNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullablePhysicalAddressNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullablePhysicalAddressNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullablePhysicalAddressNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullablePhysicalAddressNestedCollection(instance) == null); + nullablePhysicalAddressNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, IEnumerable value) => WriteNullablePhysicalAddressNestedCollection(entity, value)); + nullablePhysicalAddressNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, IEnumerable value) => WriteNullablePhysicalAddressNestedCollection(entity, value)); + nullablePhysicalAddressNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullablePhysicalAddressNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullablePhysicalAddressNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullablePhysicalAddressNestedCollection, 198), + (InternalEntityEntry entry) => entry.GetCurrentValue>(nullablePhysicalAddressNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[198]); + nullablePhysicalAddressNestedCollection.SetPropertyIndexes( + index: 198, + originalValueIndex: 198, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullablePhysicalAddressNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, PhysicalAddress[][]>(new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v)))), + keyComparer: new ListOfReferenceTypesComparer, PhysicalAddress[][]>(new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, PhysicalAddress[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v))))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, PhysicalAddress[][]>( + new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v)))))), elementMapping: SqlServerStringTypeMapping.Default.Clone( - comparer: new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), (PhysicalAddress v) => v.GetHashCode(), - (PhysicalAddress v) => v), - keyComparer: new ValueComparer( + (PhysicalAddress v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), (PhysicalAddress v) => v.GetHashCode(), - (PhysicalAddress v) => v), + (PhysicalAddress v) => v))), providerValueComparer: new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v), mappingInfo: new RelationalTypeMappingInfo( - storeTypeName: "nvarchar(20)", - size: 20, + storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new ValueConverter( - (PhysicalAddress v) => v.ToString(), - (string v) => PhysicalAddress.Parse(v)), - jsonValueReaderWriter: new JsonConvertedValueReaderWriter( - JsonStringReaderWriter.Instance, - new ValueConverter( - (PhysicalAddress v) => v.ToString(), - (string v) => PhysicalAddress.Parse(v))))); - nullablePhysicalAddressArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v)))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v))))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v)), + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v))))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v)))), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v), + keyComparer: new ValueComparer( + (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), + (PhysicalAddress v) => v.GetHashCode(), + (PhysicalAddress v) => v), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(20)", + size: 20, + unicode: true, + dbType: System.Data.DbType.String), + converter: new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v)), + jsonValueReaderWriter: new JsonConvertedValueReaderWriter( + JsonStringReaderWriter.Instance, + new ValueConverter( + (PhysicalAddress v) => v.ToString(), + (string v) => PhysicalAddress.Parse(v))))))); + nullablePhysicalAddressNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); var nullableString = runtimeEntityType.AddProperty( "NullableString", @@ -11609,12 +13633,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableString.SetAccessors( (InternalEntityEntry entry) => ReadNullableString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableString, 181), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableString, 199), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableString), - (ValueBuffer valueBuffer) => valueBuffer[181]); + (ValueBuffer valueBuffer) => valueBuffer[199]); nullableString.SetPropertyIndexes( - index: 181, - originalValueIndex: 181, + index: 199, + originalValueIndex: 199, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11655,21 +13679,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableStringArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableStringArray, 182), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableStringArray, 200), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableStringArray), - (ValueBuffer valueBuffer) => valueBuffer[182]); + (ValueBuffer valueBuffer) => valueBuffer[200]); nullableStringArray.SetPropertyIndexes( - index: 182, - originalValueIndex: 182, + index: 200, + originalValueIndex: 200, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableStringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -11681,10 +13705,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -11706,6 +13730,98 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypePostfix: StoreTypePostfix.None)); nullableStringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableStringNestedCollection = runtimeEntityType.AddProperty( + "NullableStringNestedCollection", + typeof(string[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableStringNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableStringNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableStringNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableStringNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableStringNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableStringNestedCollection(instance) == null); + nullableStringNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string[][] value) => WriteNullableStringNestedCollection(entity, value)); + nullableStringNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string[][] value) => WriteNullableStringNestedCollection(entity, value)); + nullableStringNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableStringNestedCollection, 201), + (InternalEntityEntry entry) => entry.GetCurrentValue(nullableStringNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[201]); + nullableStringNestedCollection.SetPropertyIndexes( + index: 201, + originalValueIndex: 201, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableStringNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v)), + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + keyComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + storeTypePostfix: StoreTypePostfix.None))); + nullableStringNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableTimeOnly = runtimeEntityType.AddProperty( "NullableTimeOnly", typeof(TimeOnly?), @@ -11724,12 +13840,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableTimeOnly.SetAccessors( (InternalEntityEntry entry) => ReadNullableTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableTimeOnly, 183), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableTimeOnly, 202), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableTimeOnly), - (ValueBuffer valueBuffer) => valueBuffer[183]); + (ValueBuffer valueBuffer) => valueBuffer[202]); nullableTimeOnly.SetPropertyIndexes( - index: 183, - originalValueIndex: 183, + index: 202, + originalValueIndex: 202, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11765,21 +13881,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableTimeOnlyArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableTimeOnlyArray, 184), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableTimeOnlyArray, 203), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableTimeOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[184]); + (ValueBuffer valueBuffer) => valueBuffer[203]); nullableTimeOnlyArray.SetPropertyIndexes( - index: 184, - originalValueIndex: 184, + index: 203, + originalValueIndex: 203, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableTimeOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (TimeOnly)v1 == (TimeOnly)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((TimeOnly)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(TimeOnly)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (TimeOnly)v1 == (TimeOnly)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((TimeOnly)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(TimeOnly)v : default(Nullable))), @@ -11791,10 +13907,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonTimeOnlyReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonTimeOnlyReaderWriter.Instance), elementMapping: SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -11829,12 +13945,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableTimeSpan.SetAccessors( (InternalEntityEntry entry) => ReadNullableTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableTimeSpan, 185), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableTimeSpan, 204), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableTimeSpan), - (ValueBuffer valueBuffer) => valueBuffer[185]); + (ValueBuffer valueBuffer) => valueBuffer[204]); nullableTimeSpan.SetPropertyIndexes( - index: 185, - originalValueIndex: 185, + index: 204, + originalValueIndex: 204, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11870,21 +13986,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableTimeSpanArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableTimeSpanArray, 186), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableTimeSpanArray, 205), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableTimeSpanArray), - (ValueBuffer valueBuffer) => valueBuffer[186]); + (ValueBuffer valueBuffer) => valueBuffer[205]); nullableTimeSpanArray.SetPropertyIndexes( - index: 186, - originalValueIndex: 186, + index: 205, + originalValueIndex: 205, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableTimeSpanArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (TimeSpan)v1 == (TimeSpan)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((TimeSpan)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(TimeSpan)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (TimeSpan)v1 == (TimeSpan)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((TimeSpan)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(TimeSpan)v : default(Nullable))), @@ -11896,10 +14012,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonTimeSpanReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonTimeSpanReaderWriter.Instance), elementMapping: SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -11934,12 +14050,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt16.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt16, 187), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt16, 206), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableUInt16), - (ValueBuffer valueBuffer) => valueBuffer[187]); + (ValueBuffer valueBuffer) => valueBuffer[206]); nullableUInt16.SetPropertyIndexes( - index: 187, - originalValueIndex: 187, + index: 206, + originalValueIndex: 206, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -11983,21 +14099,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt16Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt16Array, 188), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt16Array, 207), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableUInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[188]); + (ValueBuffer valueBuffer) => valueBuffer[207]); nullableUInt16Array.SetPropertyIndexes( - index: 188, - originalValueIndex: 188, + index: 207, + originalValueIndex: 207, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableUInt16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (ushort)v1 == (ushort)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(ushort)v : 0, (Nullable v) => v.HasValue ? (Nullable)(ushort)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (ushort)v1 == (ushort)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(ushort)v : 0, (Nullable v) => v.HasValue ? (Nullable)(ushort)v : default(Nullable))), @@ -12009,14 +14125,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (ushort v) => (int)v, (int v) => (ushort)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -12063,12 +14179,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt32.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt32, 189), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt32, 208), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableUInt32), - (ValueBuffer valueBuffer) => valueBuffer[189]); + (ValueBuffer valueBuffer) => valueBuffer[208]); nullableUInt32.SetPropertyIndexes( - index: 189, - originalValueIndex: 189, + index: 208, + originalValueIndex: 208, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12112,21 +14228,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt32Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt32Array, 190), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt32Array, 209), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableUInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[190]); + (ValueBuffer valueBuffer) => valueBuffer[209]); nullableUInt32Array.SetPropertyIndexes( - index: 190, - originalValueIndex: 190, + index: 209, + originalValueIndex: 209, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableUInt32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (uint)v1 == (uint)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(uint)v : 0, (Nullable v) => v.HasValue ? (Nullable)(uint)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (uint)v1 == (uint)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(uint)v : 0, (Nullable v) => v.HasValue ? (Nullable)(uint)v : default(Nullable))), @@ -12138,14 +14254,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (uint v) => (long)v, (long v) => (uint)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -12192,12 +14308,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt64.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt64, 191), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt64, 210), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableUInt64), - (ValueBuffer valueBuffer) => valueBuffer[191]); + (ValueBuffer valueBuffer) => valueBuffer[210]); nullableUInt64.SetPropertyIndexes( - index: 191, - originalValueIndex: 191, + index: 210, + originalValueIndex: 210, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12245,21 +14361,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt64Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt64Array, 192), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt64Array, 211), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableUInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[192]); + (ValueBuffer valueBuffer) => valueBuffer[211]); nullableUInt64Array.SetPropertyIndexes( - index: 192, - originalValueIndex: 192, + index: 211, + originalValueIndex: 211, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableUInt64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (ulong)v1 == (ulong)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((ulong)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(ulong)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (ulong)v1 == (ulong)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? ((ulong)v).GetHashCode() : 0, (Nullable v) => v.HasValue ? (Nullable)(ulong)v : default(Nullable))), @@ -12271,14 +14387,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (ulong v) => (decimal)v, (decimal v) => (ulong)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -12329,12 +14445,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt8.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt8, 193), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(nullableUInt8, 212), (InternalEntityEntry entry) => entry.GetCurrentValue>(nullableUInt8), - (ValueBuffer valueBuffer) => valueBuffer[193]); + (ValueBuffer valueBuffer) => valueBuffer[212]); nullableUInt8.SetPropertyIndexes( - index: 193, - originalValueIndex: 193, + index: 212, + originalValueIndex: 212, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12370,21 +14486,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUInt8Array.SetAccessors( (InternalEntityEntry entry) => ReadNullableUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt8Array, 194), + (InternalEntityEntry entry) => entry.ReadOriginalValue[]>(nullableUInt8Array, 213), (InternalEntityEntry entry) => entry.GetCurrentValue[]>(nullableUInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[194]); + (ValueBuffer valueBuffer) => valueBuffer[213]); nullableUInt8Array.SetPropertyIndexes( - index: 194, - originalValueIndex: 194, + index: 213, + originalValueIndex: 213, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableUInt8Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new NullableValueTypeListComparer(new ValueComparer( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (byte)v1 == (byte)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(byte)v : 0, (Nullable v) => v.HasValue ? (Nullable)(byte)v : default(Nullable))), - keyComparer: new NullableValueTypeListComparer(new ValueComparer( + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (byte)v1 == (byte)v2 || !v1.HasValue && !v2.HasValue, (Nullable v) => v.HasValue ? (int)(byte)v : 0, (Nullable v) => v.HasValue ? (Nullable)(byte)v : default(Nullable))), @@ -12396,10 +14512,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonNullableStructCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonNullableStructCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -12416,6 +14532,93 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas (byte v) => v))); nullableUInt8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableUInt8NestedCollection = runtimeEntityType.AddProperty( + "NullableUInt8NestedCollection", + typeof(byte?[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("NullableUInt8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + nullableUInt8NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadNullableUInt8NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadNullableUInt8NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadNullableUInt8NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadNullableUInt8NestedCollection(instance) == null); + nullableUInt8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableUInt8NestedCollection(entity, value)); + nullableUInt8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, Nullable[][] value) => WriteNullableUInt8NestedCollection(entity, value)); + nullableUInt8NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadNullableUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadNullableUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue[][]>(nullableUInt8NestedCollection, 214), + (InternalEntityEntry entry) => entry.GetCurrentValue[][]>(nullableUInt8NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[214]); + nullableUInt8NestedCollection.SetPropertyIndexes( + index: 214, + originalValueIndex: 214, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + nullableUInt8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (byte)v1 == (byte)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)(byte)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(byte)v : default(Nullable)))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (byte)v1 == (byte)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)(byte)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(byte)v : default(Nullable)))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonByteReaderWriter.Instance))), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfNullableStructsReaderWriter( + JsonByteReaderWriter.Instance)), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (byte)v1 == (byte)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)(byte)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(byte)v : default(Nullable))), + keyComparer: new ListOfNullableValueTypesComparer(new ValueComparer( + (Nullable v1, Nullable v2) => v1.HasValue && v2.HasValue && (byte)v1 == (byte)v2 || !v1.HasValue && !v2.HasValue, + (Nullable v) => v.HasValue ? (int)(byte)v : 0, + (Nullable v) => v.HasValue ? (Nullable)(byte)v : default(Nullable))), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfNullableStructsReaderWriter( + JsonByteReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfNullableStructsReaderWriter( + JsonByteReaderWriter.Instance), + elementMapping: SqlServerByteTypeMapping.Default.Clone( + comparer: new ValueComparer( + (byte v1, byte v2) => v1 == v2, + (byte v) => (int)v, + (byte v) => v), + keyComparer: new ValueComparer( + (byte v1, byte v2) => v1 == v2, + (byte v) => (int)v, + (byte v) => v), + providerValueComparer: new ValueComparer( + (byte v1, byte v2) => v1 == v2, + (byte v) => (int)v, + (byte v) => v)))); + nullableUInt8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var nullableUri = runtimeEntityType.AddProperty( "NullableUri", typeof(Uri), @@ -12434,12 +14637,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUri.SetAccessors( (InternalEntityEntry entry) => ReadNullableUri((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUri, 195), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUri, 215), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUri), - (ValueBuffer valueBuffer) => valueBuffer[195]); + (ValueBuffer valueBuffer) => valueBuffer[215]); nullableUri.SetPropertyIndexes( - index: 195, - originalValueIndex: 195, + index: 215, + originalValueIndex: 215, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12488,21 +14691,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas nullableUriArray.SetAccessors( (InternalEntityEntry entry) => ReadNullableUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadNullableUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUriArray, 196), + (InternalEntityEntry entry) => entry.ReadOriginalValue(nullableUriArray, 216), (InternalEntityEntry entry) => entry.GetCurrentValue(nullableUriArray), - (ValueBuffer valueBuffer) => valueBuffer[196]); + (ValueBuffer valueBuffer) => valueBuffer[216]); nullableUriArray.SetPropertyIndexes( - index: 196, - originalValueIndex: 196, + index: 216, + originalValueIndex: 216, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); nullableUriArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (Uri v1, Uri v2) => v1 == v2, (Uri v) => v.GetHashCode(), (Uri v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (Uri v1, Uri v2) => v1 == v2, (Uri v) => v.GetHashCode(), (Uri v) => v)), @@ -12514,14 +14717,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (Uri v) => v.ToString(), (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -12572,12 +14775,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas physicalAddress.SetAccessors( (InternalEntityEntry entry) => ReadPhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadPhysicalAddress((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddress, 197), + (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddress, 217), (InternalEntityEntry entry) => entry.GetCurrentValue(physicalAddress), - (ValueBuffer valueBuffer) => valueBuffer[197]); + (ValueBuffer valueBuffer) => valueBuffer[217]); physicalAddress.SetPropertyIndexes( - index: 197, - originalValueIndex: 197, + index: 217, + originalValueIndex: 217, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12626,21 +14829,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas physicalAddressArray.SetAccessors( (InternalEntityEntry entry) => ReadPhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadPhysicalAddressArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressArray, 198), + (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressArray, 218), (InternalEntityEntry entry) => entry.GetCurrentValue(physicalAddressArray), - (ValueBuffer valueBuffer) => valueBuffer[198]); + (ValueBuffer valueBuffer) => valueBuffer[218]); physicalAddressArray.SetPropertyIndexes( - index: 198, - originalValueIndex: 198, + index: 218, + originalValueIndex: 218, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); physicalAddressArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), (PhysicalAddress v) => v.GetHashCode(), (PhysicalAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (PhysicalAddress v1, PhysicalAddress v2) => object.Equals(v1, v2), (PhysicalAddress v) => v.GetHashCode(), (PhysicalAddress v) => v)), @@ -12652,14 +14855,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (PhysicalAddress v) => v.ToString(), (string v) => PhysicalAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -12711,12 +14914,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas physicalAddressToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadPhysicalAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadPhysicalAddressToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressToBytesConverterProperty, 199), + (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressToBytesConverterProperty, 219), (InternalEntityEntry entry) => entry.GetCurrentValue(physicalAddressToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[199]); + (ValueBuffer valueBuffer) => valueBuffer[219]); physicalAddressToBytesConverterProperty.SetPropertyIndexes( - index: 199, - originalValueIndex: 199, + index: 219, + originalValueIndex: 219, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12764,12 +14967,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas physicalAddressToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadPhysicalAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadPhysicalAddressToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressToStringConverterProperty, 200), + (InternalEntityEntry entry) => entry.ReadOriginalValue(physicalAddressToStringConverterProperty, 220), (InternalEntityEntry entry) => entry.GetCurrentValue(physicalAddressToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[200]); + (ValueBuffer valueBuffer) => valueBuffer[220]); physicalAddressToStringConverterProperty.SetPropertyIndexes( - index: 200, - originalValueIndex: 200, + index: 220, + originalValueIndex: 220, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12818,12 +15021,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas @string.SetAccessors( (InternalEntityEntry entry) => ReadString((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadString((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(@string, 201), + (InternalEntityEntry entry) => entry.ReadOriginalValue(@string, 221), (InternalEntityEntry entry) => entry.GetCurrentValue(@string), - (ValueBuffer valueBuffer) => valueBuffer[201]); + (ValueBuffer valueBuffer) => valueBuffer[221]); @string.SetPropertyIndexes( - index: 201, - originalValueIndex: 201, + index: 221, + originalValueIndex: 221, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12864,24 +15067,92 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringArray.SetAccessors( (InternalEntityEntry entry) => ReadStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringArray, 202), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringArray, 222), (InternalEntityEntry entry) => entry.GetCurrentValue(stringArray), - (ValueBuffer valueBuffer) => valueBuffer[202]); + (ValueBuffer valueBuffer) => valueBuffer[222]); stringArray.SetPropertyIndexes( - index: 202, - originalValueIndex: 202, + index: 222, + originalValueIndex: 222, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + stringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v)), + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + keyComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + storeTypePostfix: StoreTypePostfix.None)); + stringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + + var stringNestedCollection = runtimeEntityType.AddProperty( + "StringNestedCollection", + typeof(string[][]), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("StringNestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + stringNestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadStringNestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadStringNestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadStringNestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadStringNestedCollection(instance) == null); + stringNestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, string[][] value) => WriteStringNestedCollection(entity, value)); + stringNestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, string[][] value) => WriteStringNestedCollection(entity, value)); + stringNestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadStringNestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringNestedCollection, 223), + (InternalEntityEntry entry) => entry.GetCurrentValue(stringNestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[223]); + stringNestedCollection.SetPropertyIndexes( + index: 223, + originalValueIndex: 223, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); - stringArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + stringNestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), - (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + (string v) => v))), + keyComparer: new ListOfReferenceTypesComparer(new ListOfReferenceTypesComparer(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), - (string v) => v)), + (string v) => v))), providerValueComparer: new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), @@ -12890,20 +15161,22 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( - JsonStringReaderWriter.Instance)), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( - JsonStringReaderWriter.Instance), + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance)), elementMapping: SqlServerStringTypeMapping.Default.Clone( - comparer: new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), - (string v) => v), - keyComparer: new ValueComparer( + (string v) => v)), + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), - (string v) => v), + (string v) => v)), providerValueComparer: new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), @@ -12912,8 +15185,30 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - storeTypePostfix: StoreTypePostfix.None)); - stringArray.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( + JsonStringReaderWriter.Instance), + elementMapping: SqlServerStringTypeMapping.Default.Clone( + comparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + keyComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + storeTypePostfix: StoreTypePostfix.None))); + stringNestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); var stringToBoolConverterProperty = runtimeEntityType.AddProperty( "StringToBoolConverterProperty", @@ -12933,12 +15228,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToBoolConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToBoolConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToBoolConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToBoolConverterProperty, 203), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToBoolConverterProperty, 224), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToBoolConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[203]); + (ValueBuffer valueBuffer) => valueBuffer[224]); stringToBoolConverterProperty.SetPropertyIndexes( - index: 203, - originalValueIndex: 203, + index: 224, + originalValueIndex: 224, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -12983,12 +15278,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToBytesConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToBytesConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToBytesConverterProperty, 204), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToBytesConverterProperty, 225), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToBytesConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[204]); + (ValueBuffer valueBuffer) => valueBuffer[225]); stringToBytesConverterProperty.SetPropertyIndexes( - index: 204, - originalValueIndex: 204, + index: 225, + originalValueIndex: 225, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13036,12 +15331,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToCharConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToCharConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToCharConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToCharConverterProperty, 205), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToCharConverterProperty, 226), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToCharConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[205]); + (ValueBuffer valueBuffer) => valueBuffer[226]); stringToCharConverterProperty.SetPropertyIndexes( - index: 205, - originalValueIndex: 205, + index: 226, + originalValueIndex: 226, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13091,12 +15386,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToDateOnlyConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToDateOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToDateOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateOnlyConverterProperty, 206), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateOnlyConverterProperty, 227), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDateOnlyConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[206]); + (ValueBuffer valueBuffer) => valueBuffer[227]); stringToDateOnlyConverterProperty.SetPropertyIndexes( - index: 206, - originalValueIndex: 206, + index: 227, + originalValueIndex: 227, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13143,12 +15438,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToDateTimeConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToDateTimeConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToDateTimeConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateTimeConverterProperty, 207), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateTimeConverterProperty, 228), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDateTimeConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[207]); + (ValueBuffer valueBuffer) => valueBuffer[228]); stringToDateTimeConverterProperty.SetPropertyIndexes( - index: 207, - originalValueIndex: 207, + index: 228, + originalValueIndex: 228, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13195,12 +15490,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToDateTimeOffsetConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToDateTimeOffsetConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToDateTimeOffsetConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateTimeOffsetConverterProperty, 208), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDateTimeOffsetConverterProperty, 229), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDateTimeOffsetConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[208]); + (ValueBuffer valueBuffer) => valueBuffer[229]); stringToDateTimeOffsetConverterProperty.SetPropertyIndexes( - index: 208, - originalValueIndex: 208, + index: 229, + originalValueIndex: 229, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13247,12 +15542,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToDecimalNumberConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToDecimalNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToDecimalNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDecimalNumberConverterProperty, 209), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDecimalNumberConverterProperty, 230), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDecimalNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[209]); + (ValueBuffer valueBuffer) => valueBuffer[230]); stringToDecimalNumberConverterProperty.SetPropertyIndexes( - index: 209, - originalValueIndex: 209, + index: 230, + originalValueIndex: 230, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13299,12 +15594,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToDoubleNumberConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToDoubleNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToDoubleNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDoubleNumberConverterProperty, 210), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToDoubleNumberConverterProperty, 231), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToDoubleNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[210]); + (ValueBuffer valueBuffer) => valueBuffer[231]); stringToDoubleNumberConverterProperty.SetPropertyIndexes( - index: 210, - originalValueIndex: 210, + index: 231, + originalValueIndex: 231, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13351,12 +15646,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToEnumConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToEnumConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToEnumConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToEnumConverterProperty, 211), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToEnumConverterProperty, 232), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToEnumConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[211]); + (ValueBuffer valueBuffer) => valueBuffer[232]); stringToEnumConverterProperty.SetPropertyIndexes( - index: 211, - originalValueIndex: 211, + index: 232, + originalValueIndex: 232, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13400,12 +15695,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToGuidConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToGuidConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToGuidConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToGuidConverterProperty, 212), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToGuidConverterProperty, 233), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToGuidConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[212]); + (ValueBuffer valueBuffer) => valueBuffer[233]); stringToGuidConverterProperty.SetPropertyIndexes( - index: 212, - originalValueIndex: 212, + index: 233, + originalValueIndex: 233, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13447,12 +15742,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToIntNumberConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToIntNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToIntNumberConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToIntNumberConverterProperty, 213), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToIntNumberConverterProperty, 234), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToIntNumberConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[213]); + (ValueBuffer valueBuffer) => valueBuffer[234]); stringToIntNumberConverterProperty.SetPropertyIndexes( - index: 213, - originalValueIndex: 213, + index: 234, + originalValueIndex: 234, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13499,12 +15794,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToTimeOnlyConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToTimeOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToTimeOnlyConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToTimeOnlyConverterProperty, 214), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToTimeOnlyConverterProperty, 235), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToTimeOnlyConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[214]); + (ValueBuffer valueBuffer) => valueBuffer[235]); stringToTimeOnlyConverterProperty.SetPropertyIndexes( - index: 214, - originalValueIndex: 214, + index: 235, + originalValueIndex: 235, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13551,12 +15846,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToTimeSpanConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToTimeSpanConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToTimeSpanConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToTimeSpanConverterProperty, 215), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToTimeSpanConverterProperty, 236), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToTimeSpanConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[215]); + (ValueBuffer valueBuffer) => valueBuffer[236]); stringToTimeSpanConverterProperty.SetPropertyIndexes( - index: 215, - originalValueIndex: 215, + index: 236, + originalValueIndex: 236, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13603,12 +15898,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas stringToUriConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadStringToUriConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadStringToUriConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToUriConverterProperty, 216), + (InternalEntityEntry entry) => entry.ReadOriginalValue(stringToUriConverterProperty, 237), (InternalEntityEntry entry) => entry.GetCurrentValue(stringToUriConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[216]); + (ValueBuffer valueBuffer) => valueBuffer[237]); stringToUriConverterProperty.SetPropertyIndexes( - index: 216, - originalValueIndex: 216, + index: 237, + originalValueIndex: 237, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13658,12 +15953,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeOnly.SetAccessors( (InternalEntityEntry entry) => ReadTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeOnly((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnly, 217), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnly, 238), (InternalEntityEntry entry) => entry.GetCurrentValue(timeOnly), - (ValueBuffer valueBuffer) => valueBuffer[217]); + (ValueBuffer valueBuffer) => valueBuffer[238]); timeOnly.SetPropertyIndexes( - index: 217, - originalValueIndex: 217, + index: 238, + originalValueIndex: 238, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13699,21 +15994,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeOnlyArray.SetAccessors( (InternalEntityEntry entry) => ReadTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeOnlyArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyArray, 218), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyArray, 239), (InternalEntityEntry entry) => entry.GetCurrentValue(timeOnlyArray), - (ValueBuffer valueBuffer) => valueBuffer[218]); + (ValueBuffer valueBuffer) => valueBuffer[239]); timeOnlyArray.SetPropertyIndexes( - index: 218, - originalValueIndex: 218, + index: 239, + originalValueIndex: 239, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); timeOnlyArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), (TimeOnly v) => v.GetHashCode(), (TimeOnly v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (TimeOnly v1, TimeOnly v2) => v1.Equals(v2), (TimeOnly v) => v.GetHashCode(), (TimeOnly v) => v)), @@ -13725,10 +16020,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonTimeOnlyReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonTimeOnlyReaderWriter.Instance), elementMapping: SqlServerTimeOnlyTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -13763,12 +16058,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeOnlyToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadTimeOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeOnlyToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyToStringConverterProperty, 219), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyToStringConverterProperty, 240), (InternalEntityEntry entry) => entry.GetCurrentValue(timeOnlyToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[219]); + (ValueBuffer valueBuffer) => valueBuffer[240]); timeOnlyToStringConverterProperty.SetPropertyIndexes( - index: 219, - originalValueIndex: 219, + index: 240, + originalValueIndex: 240, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13819,12 +16114,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeOnlyToTicksConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadTimeOnlyToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeOnlyToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyToTicksConverterProperty, 220), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeOnlyToTicksConverterProperty, 241), (InternalEntityEntry entry) => entry.GetCurrentValue(timeOnlyToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[220]); + (ValueBuffer valueBuffer) => valueBuffer[241]); timeOnlyToTicksConverterProperty.SetPropertyIndexes( - index: 220, - originalValueIndex: 220, + index: 241, + originalValueIndex: 241, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13870,12 +16165,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeSpan.SetAccessors( (InternalEntityEntry entry) => ReadTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeSpan((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpan, 221), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpan, 242), (InternalEntityEntry entry) => entry.GetCurrentValue(timeSpan), - (ValueBuffer valueBuffer) => valueBuffer[221]); + (ValueBuffer valueBuffer) => valueBuffer[242]); timeSpan.SetPropertyIndexes( - index: 221, - originalValueIndex: 221, + index: 242, + originalValueIndex: 242, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -13911,21 +16206,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeSpanArray.SetAccessors( (InternalEntityEntry entry) => ReadTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeSpanArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanArray, 222), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanArray, 243), (InternalEntityEntry entry) => entry.GetCurrentValue(timeSpanArray), - (ValueBuffer valueBuffer) => valueBuffer[222]); + (ValueBuffer valueBuffer) => valueBuffer[243]); timeSpanArray.SetPropertyIndexes( - index: 222, - originalValueIndex: 222, + index: 243, + originalValueIndex: 243, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); timeSpanArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), (TimeSpan v) => v.GetHashCode(), (TimeSpan v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (TimeSpan v1, TimeSpan v2) => v1.Equals(v2), (TimeSpan v) => v.GetHashCode(), (TimeSpan v) => v)), @@ -13937,10 +16232,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonTimeSpanReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonTimeSpanReaderWriter.Instance), elementMapping: SqlServerTimeSpanTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -13975,12 +16270,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeSpanToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadTimeSpanToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeSpanToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanToStringConverterProperty, 223), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanToStringConverterProperty, 244), (InternalEntityEntry entry) => entry.GetCurrentValue(timeSpanToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[223]); + (ValueBuffer valueBuffer) => valueBuffer[244]); timeSpanToStringConverterProperty.SetPropertyIndexes( - index: 223, - originalValueIndex: 223, + index: 244, + originalValueIndex: 244, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14031,12 +16326,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas timeSpanToTicksConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadTimeSpanToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadTimeSpanToTicksConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanToTicksConverterProperty, 224), + (InternalEntityEntry entry) => entry.ReadOriginalValue(timeSpanToTicksConverterProperty, 245), (InternalEntityEntry entry) => entry.GetCurrentValue(timeSpanToTicksConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[224]); + (ValueBuffer valueBuffer) => valueBuffer[245]); timeSpanToTicksConverterProperty.SetPropertyIndexes( - index: 224, - originalValueIndex: 224, + index: 245, + originalValueIndex: 245, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14081,12 +16376,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt16.SetAccessors( (InternalEntityEntry entry) => ReadUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt16((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt16, 225), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt16, 246), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt16), - (ValueBuffer valueBuffer) => valueBuffer[225]); + (ValueBuffer valueBuffer) => valueBuffer[246]); uInt16.SetPropertyIndexes( - index: 225, - originalValueIndex: 225, + index: 246, + originalValueIndex: 246, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14131,21 +16426,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt16Array.SetAccessors( (InternalEntityEntry entry) => ReadUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt16Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt16Array, 226), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt16Array, 247), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt16Array), - (ValueBuffer valueBuffer) => valueBuffer[226]); + (ValueBuffer valueBuffer) => valueBuffer[247]); uInt16Array.SetPropertyIndexes( - index: 226, - originalValueIndex: 226, + index: 247, + originalValueIndex: 247, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); uInt16Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (ushort v1, ushort v2) => v1 == v2, (ushort v) => (int)v, (ushort v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (ushort v1, ushort v2) => v1 == v2, (ushort v) => (int)v, (ushort v) => v)), @@ -14157,14 +16452,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( (ushort v) => (int)v, (int v) => (ushort)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt32ReaderWriter.Instance, new ValueConverter( @@ -14210,12 +16505,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt32.SetAccessors( (InternalEntityEntry entry) => ReadUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt32((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt32, 227), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt32, 248), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt32), - (ValueBuffer valueBuffer) => valueBuffer[227]); + (ValueBuffer valueBuffer) => valueBuffer[248]); uInt32.SetPropertyIndexes( - index: 227, - originalValueIndex: 227, + index: 248, + originalValueIndex: 248, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14260,21 +16555,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt32Array.SetAccessors( (InternalEntityEntry entry) => ReadUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt32Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt32Array, 228), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt32Array, 249), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt32Array), - (ValueBuffer valueBuffer) => valueBuffer[228]); + (ValueBuffer valueBuffer) => valueBuffer[249]); uInt32Array.SetPropertyIndexes( - index: 228, - originalValueIndex: 228, + index: 249, + originalValueIndex: 249, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); uInt32Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (uint v1, uint v2) => v1 == v2, (uint v) => (int)v, (uint v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (uint v1, uint v2) => v1 == v2, (uint v) => (int)v, (uint v) => v)), @@ -14286,14 +16581,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( (uint v) => (long)v, (long v) => (uint)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonInt64ReaderWriter.Instance, new ValueConverter( @@ -14339,12 +16634,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt64.SetAccessors( (InternalEntityEntry entry) => ReadUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt64((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt64, 229), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt64, 250), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt64), - (ValueBuffer valueBuffer) => valueBuffer[229]); + (ValueBuffer valueBuffer) => valueBuffer[250]); uInt64.SetPropertyIndexes( - index: 229, - originalValueIndex: 229, + index: 250, + originalValueIndex: 250, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14393,21 +16688,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt64Array.SetAccessors( (InternalEntityEntry entry) => ReadUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt64Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt64Array, 230), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt64Array, 251), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt64Array), - (ValueBuffer valueBuffer) => valueBuffer[230]); + (ValueBuffer valueBuffer) => valueBuffer[251]); uInt64Array.SetPropertyIndexes( - index: 230, - originalValueIndex: 230, + index: 251, + originalValueIndex: 251, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); uInt64Array.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (ulong v1, ulong v2) => v1 == v2, (ulong v) => v.GetHashCode(), (ulong v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (ulong v1, ulong v2) => v1 == v2, (ulong v) => v.GetHashCode(), (ulong v) => v)), @@ -14419,14 +16714,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( (ulong v) => (decimal)v, (decimal v) => (ulong)v)))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( new JsonConvertedValueReaderWriter( JsonDecimalReaderWriter.Instance, new ValueConverter( @@ -14477,12 +16772,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt8.SetAccessors( (InternalEntityEntry entry) => ReadUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt8((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt8, 231), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt8, 252), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt8), - (ValueBuffer valueBuffer) => valueBuffer[231]); + (ValueBuffer valueBuffer) => valueBuffer[252]); uInt8.SetPropertyIndexes( - index: 231, - originalValueIndex: 231, + index: 252, + originalValueIndex: 252, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14518,12 +16813,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uInt8Array.SetAccessors( (InternalEntityEntry entry) => ReadUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUInt8Array((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt8Array, 232), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uInt8Array, 253), (InternalEntityEntry entry) => entry.GetCurrentValue(uInt8Array), - (ValueBuffer valueBuffer) => valueBuffer[232]); + (ValueBuffer valueBuffer) => valueBuffer[253]); uInt8Array.SetPropertyIndexes( - index: 232, - originalValueIndex: 232, + index: 253, + originalValueIndex: 253, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14545,6 +16840,72 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypePostfix: StoreTypePostfix.None); uInt8Array.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var uInt8NestedCollection = runtimeEntityType.AddProperty( + "UInt8NestedCollection", + typeof(List), + propertyInfo: typeof(CompiledModelTestBase.ManyTypes).GetProperty("UInt8NestedCollection", BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), + fieldInfo: typeof(CompiledModelTestBase.ManyTypes).GetField("k__BackingField", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly)); + uInt8NestedCollection.SetGetter( + (CompiledModelTestBase.ManyTypes entity) => ReadUInt8NestedCollection(entity), + (CompiledModelTestBase.ManyTypes entity) => ReadUInt8NestedCollection(entity) == null, + (CompiledModelTestBase.ManyTypes instance) => ReadUInt8NestedCollection(instance), + (CompiledModelTestBase.ManyTypes instance) => ReadUInt8NestedCollection(instance) == null); + uInt8NestedCollection.SetSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => WriteUInt8NestedCollection(entity, value)); + uInt8NestedCollection.SetMaterializationSetter( + (CompiledModelTestBase.ManyTypes entity, List value) => WriteUInt8NestedCollection(entity, value)); + uInt8NestedCollection.SetAccessors( + (InternalEntityEntry entry) => ReadUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => ReadUInt8NestedCollection((CompiledModelTestBase.ManyTypes)entry.Entity), + (InternalEntityEntry entry) => entry.ReadOriginalValue>(uInt8NestedCollection, 254), + (InternalEntityEntry entry) => entry.GetCurrentValue>(uInt8NestedCollection), + (ValueBuffer valueBuffer) => valueBuffer[254]); + uInt8NestedCollection.SetPropertyIndexes( + index: 254, + originalValueIndex: 254, + shadowIndex: -1, + relationshipIndex: -1, + storeGenerationIndex: -1); + uInt8NestedCollection.TypeMapping = SqlServerStringTypeMapping.Default.Clone( + comparer: new ListOfReferenceTypesComparer, byte[]>(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v)), + keyComparer: new ListOfReferenceTypesComparer, byte[]>(new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v)), + providerValueComparer: new ValueComparer( + (string v1, string v2) => v1 == v2, + (string v) => v.GetHashCode(), + (string v) => v), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "nvarchar(max)", + unicode: true, + dbType: System.Data.DbType.String), + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, byte[]>( + JsonByteArrayReaderWriter.Instance)), + storeTypePostfix: StoreTypePostfix.None, + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, byte[]>( + JsonByteArrayReaderWriter.Instance), + elementMapping: SqlServerByteArrayTypeMapping.Default.Clone( + comparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => v.GetHashCode(), + (byte[] v) => v), + keyComparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), + (byte[] source) => source.ToArray()), + providerValueComparer: new ValueComparer( + (byte[] v1, byte[] v2) => StructuralComparisons.StructuralEqualityComparer.Equals((object)v1, (object)v2), + (byte[] v) => StructuralComparisons.StructuralEqualityComparer.GetHashCode((object)v), + (byte[] source) => source.ToArray()), + mappingInfo: new RelationalTypeMappingInfo( + storeTypeName: "varbinary(max)"), + storeTypePostfix: StoreTypePostfix.None)); + uInt8NestedCollection.AddAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.None); + var uri = runtimeEntityType.AddProperty( "Uri", typeof(Uri), @@ -14562,12 +16923,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uri.SetAccessors( (InternalEntityEntry entry) => ReadUri((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUri((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uri, 233), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uri, 255), (InternalEntityEntry entry) => entry.GetCurrentValue(uri), - (ValueBuffer valueBuffer) => valueBuffer[233]); + (ValueBuffer valueBuffer) => valueBuffer[255]); uri.SetPropertyIndexes( - index: 233, - originalValueIndex: 233, + index: 255, + originalValueIndex: 255, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14616,21 +16977,21 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uriArray.SetAccessors( (InternalEntityEntry entry) => ReadUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUriArray((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uriArray, 234), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uriArray, 256), (InternalEntityEntry entry) => entry.GetCurrentValue(uriArray), - (ValueBuffer valueBuffer) => valueBuffer[234]); + (ValueBuffer valueBuffer) => valueBuffer[256]); uriArray.SetPropertyIndexes( - index: 234, - originalValueIndex: 234, + index: 256, + originalValueIndex: 256, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); uriArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (Uri v1, Uri v2) => v1 == v2, (Uri v) => v.GetHashCode(), (Uri v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (Uri v1, Uri v2) => v1 == v2, (Uri v) => v.GetHashCode(), (Uri v) => v)), @@ -14642,14 +17003,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (Uri v) => v.ToString(), (string v) => new Uri(v, UriKind.RelativeOrAbsolute))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -14701,12 +17062,12 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas uriToStringConverterProperty.SetAccessors( (InternalEntityEntry entry) => ReadUriToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), (InternalEntityEntry entry) => ReadUriToStringConverterProperty((CompiledModelTestBase.ManyTypes)entry.Entity), - (InternalEntityEntry entry) => entry.ReadOriginalValue(uriToStringConverterProperty, 235), + (InternalEntityEntry entry) => entry.ReadOriginalValue(uriToStringConverterProperty, 257), (InternalEntityEntry entry) => entry.GetCurrentValue(uriToStringConverterProperty), - (ValueBuffer valueBuffer) => valueBuffer[235]); + (ValueBuffer valueBuffer) => valueBuffer[257]); uriToStringConverterProperty.SetPropertyIndexes( - index: 235, - originalValueIndex: 235, + index: 257, + originalValueIndex: 257, shadowIndex: -1, relationshipIndex: -1, storeGenerationIndex: -1); @@ -14750,15 +17111,18 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var id = runtimeEntityType.FindProperty("Id")!; var @bool = runtimeEntityType.FindProperty("Bool")!; var boolArray = runtimeEntityType.FindProperty("BoolArray")!; + var boolNestedCollection = runtimeEntityType.FindProperty("BoolNestedCollection")!; var boolToStringConverterProperty = runtimeEntityType.FindProperty("BoolToStringConverterProperty")!; var boolToTwoValuesConverterProperty = runtimeEntityType.FindProperty("BoolToTwoValuesConverterProperty")!; var boolToZeroOneConverterProperty = runtimeEntityType.FindProperty("BoolToZeroOneConverterProperty")!; var bytes = runtimeEntityType.FindProperty("Bytes")!; var bytesArray = runtimeEntityType.FindProperty("BytesArray")!; + var bytesNestedCollection = runtimeEntityType.FindProperty("BytesNestedCollection")!; var bytesToStringConverterProperty = runtimeEntityType.FindProperty("BytesToStringConverterProperty")!; var castingConverterProperty = runtimeEntityType.FindProperty("CastingConverterProperty")!; var @char = runtimeEntityType.FindProperty("Char")!; var charArray = runtimeEntityType.FindProperty("CharArray")!; + var charNestedCollection = runtimeEntityType.FindProperty("CharNestedCollection")!; var charToStringConverterProperty = runtimeEntityType.FindProperty("CharToStringConverterProperty")!; var dateOnly = runtimeEntityType.FindProperty("DateOnly")!; var dateOnlyArray = runtimeEntityType.FindProperty("DateOnlyArray")!; @@ -14791,6 +17155,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var enum32AsStringArray = runtimeEntityType.FindProperty("Enum32AsStringArray")!; var enum32AsStringCollection = runtimeEntityType.FindProperty("Enum32AsStringCollection")!; var enum32Collection = runtimeEntityType.FindProperty("Enum32Collection")!; + var enum32NestedCollection = runtimeEntityType.FindProperty("Enum32NestedCollection")!; var enum64 = runtimeEntityType.FindProperty("Enum64")!; var enum64Array = runtimeEntityType.FindProperty("Enum64Array")!; var enum64AsString = runtimeEntityType.FindProperty("Enum64AsString")!; @@ -14803,6 +17168,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var enum8AsStringArray = runtimeEntityType.FindProperty("Enum8AsStringArray")!; var enum8AsStringCollection = runtimeEntityType.FindProperty("Enum8AsStringCollection")!; var enum8Collection = runtimeEntityType.FindProperty("Enum8Collection")!; + var enum8NestedCollection = runtimeEntityType.FindProperty("Enum8NestedCollection")!; var enumToNumberConverterProperty = runtimeEntityType.FindProperty("EnumToNumberConverterProperty")!; var enumToStringConverterProperty = runtimeEntityType.FindProperty("EnumToStringConverterProperty")!; var enumU16 = runtimeEntityType.FindProperty("EnumU16")!; @@ -14823,6 +17189,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var enumU64AsStringArray = runtimeEntityType.FindProperty("EnumU64AsStringArray")!; var enumU64AsStringCollection = runtimeEntityType.FindProperty("EnumU64AsStringCollection")!; var enumU64Collection = runtimeEntityType.FindProperty("EnumU64Collection")!; + var enumU64NestedCollection = runtimeEntityType.FindProperty("EnumU64NestedCollection")!; var enumU8 = runtimeEntityType.FindProperty("EnumU8")!; var enumU8Array = runtimeEntityType.FindProperty("EnumU8Array")!; var enumU8AsString = runtimeEntityType.FindProperty("EnumU8AsString")!; @@ -14833,6 +17200,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var floatArray = runtimeEntityType.FindProperty("FloatArray")!; var guid = runtimeEntityType.FindProperty("Guid")!; var guidArray = runtimeEntityType.FindProperty("GuidArray")!; + var guidNestedCollection = runtimeEntityType.FindProperty("GuidNestedCollection")!; var guidToBytesConverterProperty = runtimeEntityType.FindProperty("GuidToBytesConverterProperty")!; var guidToStringConverterProperty = runtimeEntityType.FindProperty("GuidToStringConverterProperty")!; var iPAddress = runtimeEntityType.FindProperty("IPAddress")!; @@ -14843,10 +17211,13 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var int16Array = runtimeEntityType.FindProperty("Int16Array")!; var int32 = runtimeEntityType.FindProperty("Int32")!; var int32Array = runtimeEntityType.FindProperty("Int32Array")!; + var int32NestedCollection = runtimeEntityType.FindProperty("Int32NestedCollection")!; var int64 = runtimeEntityType.FindProperty("Int64")!; var int64Array = runtimeEntityType.FindProperty("Int64Array")!; + var int64NestedCollection = runtimeEntityType.FindProperty("Int64NestedCollection")!; var int8 = runtimeEntityType.FindProperty("Int8")!; var int8Array = runtimeEntityType.FindProperty("Int8Array")!; + var int8NestedCollection = runtimeEntityType.FindProperty("Int8NestedCollection")!; var intNumberToBytesConverterProperty = runtimeEntityType.FindProperty("IntNumberToBytesConverterProperty")!; var intNumberToStringConverterProperty = runtimeEntityType.FindProperty("IntNumberToStringConverterProperty")!; var nullIntToNullStringConverterProperty = runtimeEntityType.FindProperty("NullIntToNullStringConverterProperty")!; @@ -14854,6 +17225,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var nullableBoolArray = runtimeEntityType.FindProperty("NullableBoolArray")!; var nullableBytes = runtimeEntityType.FindProperty("NullableBytes")!; var nullableBytesArray = runtimeEntityType.FindProperty("NullableBytesArray")!; + var nullableBytesNestedCollection = runtimeEntityType.FindProperty("NullableBytesNestedCollection")!; var nullableChar = runtimeEntityType.FindProperty("NullableChar")!; var nullableCharArray = runtimeEntityType.FindProperty("NullableCharArray")!; var nullableDateOnly = runtimeEntityType.FindProperty("NullableDateOnly")!; @@ -14876,6 +17248,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var nullableEnum32AsStringArray = runtimeEntityType.FindProperty("NullableEnum32AsStringArray")!; var nullableEnum32AsStringCollection = runtimeEntityType.FindProperty("NullableEnum32AsStringCollection")!; var nullableEnum32Collection = runtimeEntityType.FindProperty("NullableEnum32Collection")!; + var nullableEnum32NestedCollection = runtimeEntityType.FindProperty("NullableEnum32NestedCollection")!; var nullableEnum64 = runtimeEntityType.FindProperty("NullableEnum64")!; var nullableEnum64Array = runtimeEntityType.FindProperty("NullableEnum64Array")!; var nullableEnum64AsString = runtimeEntityType.FindProperty("NullableEnum64AsString")!; @@ -14888,6 +17261,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var nullableEnum8AsStringArray = runtimeEntityType.FindProperty("NullableEnum8AsStringArray")!; var nullableEnum8AsStringCollection = runtimeEntityType.FindProperty("NullableEnum8AsStringCollection")!; var nullableEnum8Collection = runtimeEntityType.FindProperty("NullableEnum8Collection")!; + var nullableEnum8NestedCollection = runtimeEntityType.FindProperty("NullableEnum8NestedCollection")!; var nullableEnumU16 = runtimeEntityType.FindProperty("NullableEnumU16")!; var nullableEnumU16Array = runtimeEntityType.FindProperty("NullableEnumU16Array")!; var nullableEnumU16AsString = runtimeEntityType.FindProperty("NullableEnumU16AsString")!; @@ -14906,6 +17280,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var nullableEnumU64AsStringArray = runtimeEntityType.FindProperty("NullableEnumU64AsStringArray")!; var nullableEnumU64AsStringCollection = runtimeEntityType.FindProperty("NullableEnumU64AsStringCollection")!; var nullableEnumU64Collection = runtimeEntityType.FindProperty("NullableEnumU64Collection")!; + var nullableEnumU64NestedCollection = runtimeEntityType.FindProperty("NullableEnumU64NestedCollection")!; var nullableEnumU8 = runtimeEntityType.FindProperty("NullableEnumU8")!; var nullableEnumU8Array = runtimeEntityType.FindProperty("NullableEnumU8Array")!; var nullableEnumU8AsString = runtimeEntityType.FindProperty("NullableEnumU8AsString")!; @@ -14916,20 +17291,25 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var nullableFloatArray = runtimeEntityType.FindProperty("NullableFloatArray")!; var nullableGuid = runtimeEntityType.FindProperty("NullableGuid")!; var nullableGuidArray = runtimeEntityType.FindProperty("NullableGuidArray")!; + var nullableGuidNestedCollection = runtimeEntityType.FindProperty("NullableGuidNestedCollection")!; var nullableIPAddress = runtimeEntityType.FindProperty("NullableIPAddress")!; var nullableIPAddressArray = runtimeEntityType.FindProperty("NullableIPAddressArray")!; var nullableInt16 = runtimeEntityType.FindProperty("NullableInt16")!; var nullableInt16Array = runtimeEntityType.FindProperty("NullableInt16Array")!; var nullableInt32 = runtimeEntityType.FindProperty("NullableInt32")!; var nullableInt32Array = runtimeEntityType.FindProperty("NullableInt32Array")!; + var nullableInt32NestedCollection = runtimeEntityType.FindProperty("NullableInt32NestedCollection")!; var nullableInt64 = runtimeEntityType.FindProperty("NullableInt64")!; var nullableInt64Array = runtimeEntityType.FindProperty("NullableInt64Array")!; + var nullableInt64NestedCollection = runtimeEntityType.FindProperty("NullableInt64NestedCollection")!; var nullableInt8 = runtimeEntityType.FindProperty("NullableInt8")!; var nullableInt8Array = runtimeEntityType.FindProperty("NullableInt8Array")!; var nullablePhysicalAddress = runtimeEntityType.FindProperty("NullablePhysicalAddress")!; var nullablePhysicalAddressArray = runtimeEntityType.FindProperty("NullablePhysicalAddressArray")!; + var nullablePhysicalAddressNestedCollection = runtimeEntityType.FindProperty("NullablePhysicalAddressNestedCollection")!; var nullableString = runtimeEntityType.FindProperty("NullableString")!; var nullableStringArray = runtimeEntityType.FindProperty("NullableStringArray")!; + var nullableStringNestedCollection = runtimeEntityType.FindProperty("NullableStringNestedCollection")!; var nullableTimeOnly = runtimeEntityType.FindProperty("NullableTimeOnly")!; var nullableTimeOnlyArray = runtimeEntityType.FindProperty("NullableTimeOnlyArray")!; var nullableTimeSpan = runtimeEntityType.FindProperty("NullableTimeSpan")!; @@ -14942,6 +17322,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var nullableUInt64Array = runtimeEntityType.FindProperty("NullableUInt64Array")!; var nullableUInt8 = runtimeEntityType.FindProperty("NullableUInt8")!; var nullableUInt8Array = runtimeEntityType.FindProperty("NullableUInt8Array")!; + var nullableUInt8NestedCollection = runtimeEntityType.FindProperty("NullableUInt8NestedCollection")!; var nullableUri = runtimeEntityType.FindProperty("NullableUri")!; var nullableUriArray = runtimeEntityType.FindProperty("NullableUriArray")!; var physicalAddress = runtimeEntityType.FindProperty("PhysicalAddress")!; @@ -14950,6 +17331,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var physicalAddressToStringConverterProperty = runtimeEntityType.FindProperty("PhysicalAddressToStringConverterProperty")!; var @string = runtimeEntityType.FindProperty("String")!; var stringArray = runtimeEntityType.FindProperty("StringArray")!; + var stringNestedCollection = runtimeEntityType.FindProperty("StringNestedCollection")!; var stringToBoolConverterProperty = runtimeEntityType.FindProperty("StringToBoolConverterProperty")!; var stringToBytesConverterProperty = runtimeEntityType.FindProperty("StringToBytesConverterProperty")!; var stringToCharConverterProperty = runtimeEntityType.FindProperty("StringToCharConverterProperty")!; @@ -14980,6 +17362,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) var uInt64Array = runtimeEntityType.FindProperty("UInt64Array")!; var uInt8 = runtimeEntityType.FindProperty("UInt8")!; var uInt8Array = runtimeEntityType.FindProperty("UInt8Array")!; + var uInt8NestedCollection = runtimeEntityType.FindProperty("UInt8NestedCollection")!; var uri = runtimeEntityType.FindProperty("Uri")!; var uriArray = runtimeEntityType.FindProperty("UriArray")!; var uriToStringConverterProperty = runtimeEntityType.FindProperty("UriToStringConverterProperty")!; @@ -14987,21 +17370,23 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) (InternalEntityEntry source) => { var entity = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg = (ISnapshot)new Snapshot(((ValueComparer)id.GetValueComparer()).Snapshot(source.GetCurrentValue(id)), ((ValueComparer)@bool.GetValueComparer()).Snapshot(source.GetCurrentValue(@bool)), (IEnumerable)source.GetCurrentValue(boolArray) == null ? null : (bool[])((ValueComparer>)boolArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(boolArray)), ((ValueComparer)boolToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(boolToStringConverterProperty)), ((ValueComparer)boolToTwoValuesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(boolToTwoValuesConverterProperty)), ((ValueComparer)boolToZeroOneConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(boolToZeroOneConverterProperty)), source.GetCurrentValue(bytes) == null ? null : ((ValueComparer)bytes.GetValueComparer()).Snapshot(source.GetCurrentValue(bytes)), (IEnumerable)source.GetCurrentValue(bytesArray) == null ? null : (byte[][])((ValueComparer>)bytesArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(bytesArray)), source.GetCurrentValue(bytesToStringConverterProperty) == null ? null : ((ValueComparer)bytesToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(bytesToStringConverterProperty)), ((ValueComparer)castingConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(castingConverterProperty)), ((ValueComparer)@char.GetValueComparer()).Snapshot(source.GetCurrentValue(@char)), (IEnumerable)source.GetCurrentValue(charArray) == null ? null : (char[])((ValueComparer>)charArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(charArray)), ((ValueComparer)charToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(charToStringConverterProperty)), ((ValueComparer)dateOnly.GetValueComparer()).Snapshot(source.GetCurrentValue(dateOnly)), (IEnumerable)source.GetCurrentValue(dateOnlyArray) == null ? null : (DateOnly[])((ValueComparer>)dateOnlyArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(dateOnlyArray)), ((ValueComparer)dateOnlyToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateOnlyToStringConverterProperty)), ((ValueComparer)dateTime.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTime)), (IEnumerable)source.GetCurrentValue(dateTimeArray) == null ? null : (DateTime[])((ValueComparer>)dateTimeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(dateTimeArray)), ((ValueComparer)dateTimeOffsetToBinaryConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer)dateTimeOffsetToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer)dateTimeOffsetToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeOffsetToStringConverterProperty)), ((ValueComparer)dateTimeToBinaryConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeToBinaryConverterProperty)), ((ValueComparer)dateTimeToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeToStringConverterProperty)), ((ValueComparer)dateTimeToTicksConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeToTicksConverterProperty)), ((ValueComparer)@decimal.GetValueComparer()).Snapshot(source.GetCurrentValue(@decimal)), (IEnumerable)source.GetCurrentValue(decimalArray) == null ? null : (decimal[])((ValueComparer>)decimalArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(decimalArray)), ((ValueComparer)decimalNumberToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(decimalNumberToBytesConverterProperty)), ((ValueComparer)decimalNumberToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(decimalNumberToStringConverterProperty)), ((ValueComparer)@double.GetValueComparer()).Snapshot(source.GetCurrentValue(@double)), (IEnumerable)source.GetCurrentValue(doubleArray) == null ? null : (double[])((ValueComparer>)doubleArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(doubleArray))); + var liftedArg = (ISnapshot)new Snapshot(((ValueComparer)id.GetValueComparer()).Snapshot(source.GetCurrentValue(id)), ((ValueComparer)@bool.GetValueComparer()).Snapshot(source.GetCurrentValue(@bool)), (IEnumerable)source.GetCurrentValue(boolArray) == null ? null : (bool[])((ValueComparer>)boolArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(boolArray)), (object)source.GetCurrentValue(boolNestedCollection) == null ? null : (bool[][])((ValueComparer)boolNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(boolNestedCollection)), ((ValueComparer)boolToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(boolToStringConverterProperty)), ((ValueComparer)boolToTwoValuesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(boolToTwoValuesConverterProperty)), ((ValueComparer)boolToZeroOneConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(boolToZeroOneConverterProperty)), source.GetCurrentValue(bytes) == null ? null : ((ValueComparer)bytes.GetValueComparer()).Snapshot(source.GetCurrentValue(bytes)), (object)source.GetCurrentValue(bytesArray) == null ? null : (byte[][])((ValueComparer)bytesArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(bytesArray)), (object)source.GetCurrentValue(bytesNestedCollection) == null ? null : (byte[][][])((ValueComparer)bytesNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(bytesNestedCollection)), source.GetCurrentValue(bytesToStringConverterProperty) == null ? null : ((ValueComparer)bytesToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(bytesToStringConverterProperty)), ((ValueComparer)castingConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(castingConverterProperty)), ((ValueComparer)@char.GetValueComparer()).Snapshot(source.GetCurrentValue(@char)), (IEnumerable)source.GetCurrentValue(charArray) == null ? null : (char[])((ValueComparer>)charArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(charArray)), (object)source.GetCurrentValue(charNestedCollection) == null ? null : (char[][])((ValueComparer)charNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(charNestedCollection)), ((ValueComparer)charToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(charToStringConverterProperty)), ((ValueComparer)dateOnly.GetValueComparer()).Snapshot(source.GetCurrentValue(dateOnly)), (IEnumerable)source.GetCurrentValue(dateOnlyArray) == null ? null : (DateOnly[])((ValueComparer>)dateOnlyArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(dateOnlyArray)), ((ValueComparer)dateOnlyToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateOnlyToStringConverterProperty)), ((ValueComparer)dateTime.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTime)), (IEnumerable)source.GetCurrentValue(dateTimeArray) == null ? null : (DateTime[])((ValueComparer>)dateTimeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(dateTimeArray)), ((ValueComparer)dateTimeOffsetToBinaryConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeOffsetToBinaryConverterProperty)), ((ValueComparer)dateTimeOffsetToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeOffsetToBytesConverterProperty)), ((ValueComparer)dateTimeOffsetToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeOffsetToStringConverterProperty)), ((ValueComparer)dateTimeToBinaryConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeToBinaryConverterProperty)), ((ValueComparer)dateTimeToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeToStringConverterProperty)), ((ValueComparer)dateTimeToTicksConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(dateTimeToTicksConverterProperty)), ((ValueComparer)@decimal.GetValueComparer()).Snapshot(source.GetCurrentValue(@decimal)), (IEnumerable)source.GetCurrentValue(decimalArray) == null ? null : (decimal[])((ValueComparer>)decimalArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(decimalArray)), ((ValueComparer)decimalNumberToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(decimalNumberToBytesConverterProperty))); var entity0 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg0 = (ISnapshot)new Snapshot, List, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], List, List, CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List, List, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List, List, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32, CompiledModelTestBase.EnumU16, CompiledModelTestBase.EnumU16[]>(((ValueComparer)doubleNumberToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(doubleNumberToBytesConverterProperty)), ((ValueComparer)doubleNumberToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(doubleNumberToStringConverterProperty)), ((ValueComparer)enum16.GetValueComparer()).Snapshot(source.GetCurrentValue(enum16)), (IEnumerable)source.GetCurrentValue(enum16Array) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer>)enum16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum16Array)), ((ValueComparer)enum16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum16AsString)), (IEnumerable)source.GetCurrentValue(enum16AsStringArray) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer>)enum16AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum16AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum16AsStringCollection) == null ? null : (List)((ValueComparer>)enum16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum16AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum16Collection) == null ? null : (List)((ValueComparer>)enum16Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum16Collection)), ((ValueComparer)enum32.GetValueComparer()).Snapshot(source.GetCurrentValue(enum32)), (IEnumerable)source.GetCurrentValue(enum32Array) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer>)enum32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum32Array)), ((ValueComparer)enum32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum32AsString)), (IEnumerable)source.GetCurrentValue(enum32AsStringArray) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer>)enum32AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum32AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum32AsStringCollection) == null ? null : (List)((ValueComparer>)enum32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum32AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum32Collection) == null ? null : (List)((ValueComparer>)enum32Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum32Collection)), ((ValueComparer)enum64.GetValueComparer()).Snapshot(source.GetCurrentValue(enum64)), (IEnumerable)source.GetCurrentValue(enum64Array) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer>)enum64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum64Array)), ((ValueComparer)enum64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum64AsString)), (IEnumerable)source.GetCurrentValue(enum64AsStringArray) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer>)enum64AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum64AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum64AsStringCollection) == null ? null : (List)((ValueComparer>)enum64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum64AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum64Collection) == null ? null : (List)((ValueComparer>)enum64Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum64Collection)), ((ValueComparer)enum8.GetValueComparer()).Snapshot(source.GetCurrentValue(enum8)), (IEnumerable)source.GetCurrentValue(enum8Array) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer>)enum8Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum8Array)), ((ValueComparer)enum8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum8AsString)), (IEnumerable)source.GetCurrentValue(enum8AsStringArray) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer>)enum8AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum8AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum8AsStringCollection) == null ? null : (List)((ValueComparer>)enum8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum8AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum8Collection) == null ? null : (List)((ValueComparer>)enum8Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum8Collection)), ((ValueComparer)enumToNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(enumToNumberConverterProperty)), ((ValueComparer)enumToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(enumToStringConverterProperty)), ((ValueComparer)enumU16.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU16)), (IEnumerable)source.GetCurrentValue(enumU16Array) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer>)enumU16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU16Array))); + var liftedArg0 = (ISnapshot)new Snapshot, List, CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], CompiledModelTestBase.Enum32, CompiledModelTestBase.Enum32[], List, List, List[][], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], CompiledModelTestBase.Enum64, CompiledModelTestBase.Enum64[], List, List, CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], CompiledModelTestBase.Enum8, CompiledModelTestBase.Enum8[], List, List>(((ValueComparer)decimalNumberToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(decimalNumberToStringConverterProperty)), ((ValueComparer)@double.GetValueComparer()).Snapshot(source.GetCurrentValue(@double)), (IEnumerable)source.GetCurrentValue(doubleArray) == null ? null : (double[])((ValueComparer>)doubleArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(doubleArray)), ((ValueComparer)doubleNumberToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(doubleNumberToBytesConverterProperty)), ((ValueComparer)doubleNumberToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(doubleNumberToStringConverterProperty)), ((ValueComparer)enum16.GetValueComparer()).Snapshot(source.GetCurrentValue(enum16)), (IEnumerable)source.GetCurrentValue(enum16Array) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer>)enum16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum16Array)), ((ValueComparer)enum16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum16AsString)), (IEnumerable)source.GetCurrentValue(enum16AsStringArray) == null ? null : (CompiledModelTestBase.Enum16[])((ValueComparer>)enum16AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum16AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum16AsStringCollection) == null ? null : (List)((ValueComparer>)enum16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum16AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum16Collection) == null ? null : (List)((ValueComparer>)enum16Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum16Collection)), ((ValueComparer)enum32.GetValueComparer()).Snapshot(source.GetCurrentValue(enum32)), (IEnumerable)source.GetCurrentValue(enum32Array) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer>)enum32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum32Array)), ((ValueComparer)enum32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum32AsString)), (IEnumerable)source.GetCurrentValue(enum32AsStringArray) == null ? null : (CompiledModelTestBase.Enum32[])((ValueComparer>)enum32AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum32AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum32AsStringCollection) == null ? null : (List)((ValueComparer>)enum32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum32AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum32Collection) == null ? null : (List)((ValueComparer>)enum32Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum32Collection)), (object)source.GetCurrentValue[][]>(enum32NestedCollection) == null ? null : (List[][])((ValueComparer)enum32NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>(enum32NestedCollection)), ((ValueComparer)enum64.GetValueComparer()).Snapshot(source.GetCurrentValue(enum64)), (IEnumerable)source.GetCurrentValue(enum64Array) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer>)enum64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum64Array)), ((ValueComparer)enum64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum64AsString)), (IEnumerable)source.GetCurrentValue(enum64AsStringArray) == null ? null : (CompiledModelTestBase.Enum64[])((ValueComparer>)enum64AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum64AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum64AsStringCollection) == null ? null : (List)((ValueComparer>)enum64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum64AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum64Collection) == null ? null : (List)((ValueComparer>)enum64Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum64Collection)), ((ValueComparer)enum8.GetValueComparer()).Snapshot(source.GetCurrentValue(enum8)), (IEnumerable)source.GetCurrentValue(enum8Array) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer>)enum8Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum8Array)), ((ValueComparer)enum8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enum8AsString)), (IEnumerable)source.GetCurrentValue(enum8AsStringArray) == null ? null : (CompiledModelTestBase.Enum8[])((ValueComparer>)enum8AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enum8AsStringArray)), (IEnumerable)source.GetCurrentValue>(enum8AsStringCollection) == null ? null : (List)((ValueComparer>)enum8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum8AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enum8Collection) == null ? null : (List)((ValueComparer>)enum8Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enum8Collection))); var entity1 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg1 = (ISnapshot)new Snapshot, List, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], List, List, CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], List, List, CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], List, List, float, float[], Guid, Guid[], Guid, Guid, IPAddress, IPAddress[]>(((ValueComparer)enumU16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU16AsString)), (IEnumerable)source.GetCurrentValue(enumU16AsStringArray) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer>)enumU16AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU16AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU16AsStringCollection) == null ? null : (List)((ValueComparer>)enumU16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU16AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU16Collection) == null ? null : (List)((ValueComparer>)enumU16Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU16Collection)), ((ValueComparer)enumU32.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU32)), (IEnumerable)source.GetCurrentValue(enumU32Array) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer>)enumU32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU32Array)), ((ValueComparer)enumU32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU32AsString)), (IEnumerable)source.GetCurrentValue(enumU32AsStringArray) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer>)enumU32AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU32AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU32AsStringCollection) == null ? null : (List)((ValueComparer>)enumU32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU32AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU32Collection) == null ? null : (List)((ValueComparer>)enumU32Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU32Collection)), ((ValueComparer)enumU64.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU64)), (IEnumerable)source.GetCurrentValue(enumU64Array) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer>)enumU64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU64Array)), ((ValueComparer)enumU64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU64AsString)), (IEnumerable)source.GetCurrentValue(enumU64AsStringArray) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer>)enumU64AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU64AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU64AsStringCollection) == null ? null : (List)((ValueComparer>)enumU64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU64AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU64Collection) == null ? null : (List)((ValueComparer>)enumU64Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU64Collection)), ((ValueComparer)enumU8.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU8)), (IEnumerable)source.GetCurrentValue(enumU8Array) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer>)enumU8Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU8Array)), ((ValueComparer)enumU8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU8AsString)), (IEnumerable)source.GetCurrentValue(enumU8AsStringArray) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer>)enumU8AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU8AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU8AsStringCollection) == null ? null : (List)((ValueComparer>)enumU8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU8AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU8Collection) == null ? null : (List)((ValueComparer>)enumU8Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU8Collection)), ((ValueComparer)@float.GetValueComparer()).Snapshot(source.GetCurrentValue(@float)), (IEnumerable)source.GetCurrentValue(floatArray) == null ? null : (float[])((ValueComparer>)floatArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(floatArray)), ((ValueComparer)guid.GetValueComparer()).Snapshot(source.GetCurrentValue(guid)), (IEnumerable)source.GetCurrentValue(guidArray) == null ? null : (Guid[])((ValueComparer>)guidArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(guidArray)), ((ValueComparer)guidToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(guidToBytesConverterProperty)), ((ValueComparer)guidToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(guidToStringConverterProperty)), source.GetCurrentValue(iPAddress) == null ? null : ((ValueComparer)iPAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(iPAddress)), (IEnumerable)source.GetCurrentValue(iPAddressArray) == null ? null : (IPAddress[])((ValueComparer>)iPAddressArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(iPAddressArray))); + var liftedArg1 = (ISnapshot)new Snapshot, List, CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], CompiledModelTestBase.EnumU32, CompiledModelTestBase.EnumU32[], List, List, CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], CompiledModelTestBase.EnumU64, CompiledModelTestBase.EnumU64[], List, List, CompiledModelTestBase.EnumU64[][], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], CompiledModelTestBase.EnumU8, CompiledModelTestBase.EnumU8[], List, List, float, float[]>((object)source.GetCurrentValue(enum8NestedCollection) == null ? null : (CompiledModelTestBase.Enum8[][])((ValueComparer)enum8NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(enum8NestedCollection)), ((ValueComparer)enumToNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(enumToNumberConverterProperty)), ((ValueComparer)enumToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(enumToStringConverterProperty)), ((ValueComparer)enumU16.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU16)), (IEnumerable)source.GetCurrentValue(enumU16Array) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer>)enumU16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU16Array)), ((ValueComparer)enumU16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU16AsString)), (IEnumerable)source.GetCurrentValue(enumU16AsStringArray) == null ? null : (CompiledModelTestBase.EnumU16[])((ValueComparer>)enumU16AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU16AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU16AsStringCollection) == null ? null : (List)((ValueComparer>)enumU16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU16AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU16Collection) == null ? null : (List)((ValueComparer>)enumU16Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU16Collection)), ((ValueComparer)enumU32.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU32)), (IEnumerable)source.GetCurrentValue(enumU32Array) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer>)enumU32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU32Array)), ((ValueComparer)enumU32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU32AsString)), (IEnumerable)source.GetCurrentValue(enumU32AsStringArray) == null ? null : (CompiledModelTestBase.EnumU32[])((ValueComparer>)enumU32AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU32AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU32AsStringCollection) == null ? null : (List)((ValueComparer>)enumU32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU32AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU32Collection) == null ? null : (List)((ValueComparer>)enumU32Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU32Collection)), ((ValueComparer)enumU64.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU64)), (IEnumerable)source.GetCurrentValue(enumU64Array) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer>)enumU64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU64Array)), ((ValueComparer)enumU64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU64AsString)), (IEnumerable)source.GetCurrentValue(enumU64AsStringArray) == null ? null : (CompiledModelTestBase.EnumU64[])((ValueComparer>)enumU64AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU64AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU64AsStringCollection) == null ? null : (List)((ValueComparer>)enumU64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU64AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU64Collection) == null ? null : (List)((ValueComparer>)enumU64Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU64Collection)), (object)source.GetCurrentValue(enumU64NestedCollection) == null ? null : (CompiledModelTestBase.EnumU64[][])((ValueComparer)enumU64NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(enumU64NestedCollection)), ((ValueComparer)enumU8.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU8)), (IEnumerable)source.GetCurrentValue(enumU8Array) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer>)enumU8Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU8Array)), ((ValueComparer)enumU8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue(enumU8AsString)), (IEnumerable)source.GetCurrentValue(enumU8AsStringArray) == null ? null : (CompiledModelTestBase.EnumU8[])((ValueComparer>)enumU8AsStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(enumU8AsStringArray)), (IEnumerable)source.GetCurrentValue>(enumU8AsStringCollection) == null ? null : (List)((ValueComparer>)enumU8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU8AsStringCollection)), (IEnumerable)source.GetCurrentValue>(enumU8Collection) == null ? null : (List)((ValueComparer>)enumU8Collection.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(enumU8Collection)), ((ValueComparer)@float.GetValueComparer()).Snapshot(source.GetCurrentValue(@float)), (IEnumerable)source.GetCurrentValue(floatArray) == null ? null : (float[])((ValueComparer>)floatArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(floatArray))); var entity2 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg2 = (ISnapshot)new Snapshot, Nullable, Nullable[], byte[], byte[][], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable>(source.GetCurrentValue(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer)iPAddressToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(iPAddressToBytesConverterProperty)), source.GetCurrentValue(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer)iPAddressToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(iPAddressToStringConverterProperty)), ((ValueComparer)int16.GetValueComparer()).Snapshot(source.GetCurrentValue(int16)), (IEnumerable)source.GetCurrentValue(int16Array) == null ? null : (short[])((ValueComparer>)int16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int16Array)), ((ValueComparer)int32.GetValueComparer()).Snapshot(source.GetCurrentValue(int32)), (IEnumerable)source.GetCurrentValue(int32Array) == null ? null : (int[])((ValueComparer>)int32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int32Array)), ((ValueComparer)int64.GetValueComparer()).Snapshot(source.GetCurrentValue(int64)), (IEnumerable)source.GetCurrentValue(int64Array) == null ? null : (long[])((ValueComparer>)int64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int64Array)), ((ValueComparer)int8.GetValueComparer()).Snapshot(source.GetCurrentValue(int8)), (IEnumerable)source.GetCurrentValue(int8Array) == null ? null : (sbyte[])((ValueComparer>)int8Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int8Array)), ((ValueComparer)intNumberToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(intNumberToBytesConverterProperty)), ((ValueComparer)intNumberToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(intNumberToStringConverterProperty)), source.GetCurrentValue>(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer>)nullIntToNullStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullIntToNullStringConverterProperty)), source.GetCurrentValue>(nullableBool) == null ? null : ((ValueComparer>)nullableBool.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableBool)), (IEnumerable>)source.GetCurrentValue[]>(nullableBoolArray) == null ? null : (Nullable[])((ValueComparer>>)nullableBoolArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableBoolArray)), source.GetCurrentValue(nullableBytes) == null ? null : ((ValueComparer)nullableBytes.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableBytes)), (IEnumerable)source.GetCurrentValue(nullableBytesArray) == null ? null : (byte[][])((ValueComparer>)nullableBytesArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(nullableBytesArray)), source.GetCurrentValue>(nullableChar) == null ? null : ((ValueComparer>)nullableChar.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableChar)), (IEnumerable>)source.GetCurrentValue[]>(nullableCharArray) == null ? null : (Nullable[])((ValueComparer>>)nullableCharArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableCharArray)), source.GetCurrentValue>(nullableDateOnly) == null ? null : ((ValueComparer>)nullableDateOnly.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDateOnly)), (IEnumerable>)source.GetCurrentValue[]>(nullableDateOnlyArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDateOnlyArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDateOnlyArray)), source.GetCurrentValue>(nullableDateTime) == null ? null : ((ValueComparer>)nullableDateTime.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDateTime)), (IEnumerable>)source.GetCurrentValue[]>(nullableDateTimeArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDateTimeArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDateTimeArray)), source.GetCurrentValue>(nullableDecimal) == null ? null : ((ValueComparer>)nullableDecimal.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDecimal)), (IEnumerable>)source.GetCurrentValue[]>(nullableDecimalArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDecimalArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDecimalArray)), source.GetCurrentValue>(nullableDouble) == null ? null : ((ValueComparer>)nullableDouble.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDouble)), (IEnumerable>)source.GetCurrentValue[]>(nullableDoubleArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDoubleArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDoubleArray)), source.GetCurrentValue>(nullableEnum16) == null ? null : ((ValueComparer>)nullableEnum16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum16)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum16Array)), source.GetCurrentValue>(nullableEnum16AsString) == null ? null : ((ValueComparer>)nullableEnum16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum16AsString))); + var liftedArg2 = (ISnapshot)new Snapshot, Guid, Guid, IPAddress, IPAddress[], IPAddress, IPAddress, short, short[], int, int[], int[][], long, long[], IList[], sbyte, sbyte[], sbyte[][][], int, int, Nullable, Nullable, Nullable[], byte[], byte[][], byte[][][], Nullable, Nullable[]>(((ValueComparer)guid.GetValueComparer()).Snapshot(source.GetCurrentValue(guid)), (IEnumerable)source.GetCurrentValue(guidArray) == null ? null : (Guid[])((ValueComparer>)guidArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(guidArray)), (object)source.GetCurrentValue>(guidNestedCollection) == null ? null : (ICollection)((ValueComparer)guidNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(guidNestedCollection)), ((ValueComparer)guidToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(guidToBytesConverterProperty)), ((ValueComparer)guidToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(guidToStringConverterProperty)), source.GetCurrentValue(iPAddress) == null ? null : ((ValueComparer)iPAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(iPAddress)), (object)source.GetCurrentValue(iPAddressArray) == null ? null : (IPAddress[])((ValueComparer)iPAddressArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(iPAddressArray)), source.GetCurrentValue(iPAddressToBytesConverterProperty) == null ? null : ((ValueComparer)iPAddressToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(iPAddressToBytesConverterProperty)), source.GetCurrentValue(iPAddressToStringConverterProperty) == null ? null : ((ValueComparer)iPAddressToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(iPAddressToStringConverterProperty)), ((ValueComparer)int16.GetValueComparer()).Snapshot(source.GetCurrentValue(int16)), (IEnumerable)source.GetCurrentValue(int16Array) == null ? null : (short[])((ValueComparer>)int16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int16Array)), ((ValueComparer)int32.GetValueComparer()).Snapshot(source.GetCurrentValue(int32)), (IEnumerable)source.GetCurrentValue(int32Array) == null ? null : (int[])((ValueComparer>)int32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int32Array)), (object)source.GetCurrentValue(int32NestedCollection) == null ? null : (int[][])((ValueComparer)int32NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(int32NestedCollection)), ((ValueComparer)int64.GetValueComparer()).Snapshot(source.GetCurrentValue(int64)), (IEnumerable)source.GetCurrentValue(int64Array) == null ? null : (long[])((ValueComparer>)int64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int64Array)), (object)source.GetCurrentValue[]>(int64NestedCollection) == null ? null : (IList[])((ValueComparer)int64NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[]>(int64NestedCollection)), ((ValueComparer)int8.GetValueComparer()).Snapshot(source.GetCurrentValue(int8)), (IEnumerable)source.GetCurrentValue(int8Array) == null ? null : (sbyte[])((ValueComparer>)int8Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(int8Array)), (object)source.GetCurrentValue(int8NestedCollection) == null ? null : (sbyte[][][])((ValueComparer)int8NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(int8NestedCollection)), ((ValueComparer)intNumberToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(intNumberToBytesConverterProperty)), ((ValueComparer)intNumberToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(intNumberToStringConverterProperty)), source.GetCurrentValue>(nullIntToNullStringConverterProperty) == null ? null : ((ValueComparer>)nullIntToNullStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullIntToNullStringConverterProperty)), source.GetCurrentValue>(nullableBool) == null ? null : ((ValueComparer>)nullableBool.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableBool)), (IEnumerable>)source.GetCurrentValue[]>(nullableBoolArray) == null ? null : (Nullable[])((ValueComparer>>)nullableBoolArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableBoolArray)), source.GetCurrentValue(nullableBytes) == null ? null : ((ValueComparer)nullableBytes.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableBytes)), (object)source.GetCurrentValue(nullableBytesArray) == null ? null : (byte[][])((ValueComparer)nullableBytesArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullableBytesArray)), (object)source.GetCurrentValue(nullableBytesNestedCollection) == null ? null : (byte[][][])((ValueComparer)nullableBytesNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullableBytesNestedCollection)), source.GetCurrentValue>(nullableChar) == null ? null : ((ValueComparer>)nullableChar.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableChar)), (IEnumerable>)source.GetCurrentValue[]>(nullableCharArray) == null ? null : (Nullable[])((ValueComparer>>)nullableCharArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableCharArray))); var entity3 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg3 = (ISnapshot)new Snapshot[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable>((IEnumerable>)source.GetCurrentValue[]>(nullableEnum16AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum16AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum16AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum16AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum16AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum16Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum16Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum16Collection)), source.GetCurrentValue>(nullableEnum32) == null ? null : ((ValueComparer>)nullableEnum32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum32)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum32Array)), source.GetCurrentValue>(nullableEnum32AsString) == null ? null : ((ValueComparer>)nullableEnum32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum32AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum32AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum32AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum32AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum32AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum32AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum32Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum32Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum32Collection)), source.GetCurrentValue>(nullableEnum64) == null ? null : ((ValueComparer>)nullableEnum64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum64)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum64Array)), source.GetCurrentValue>(nullableEnum64AsString) == null ? null : ((ValueComparer>)nullableEnum64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum64AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum64AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum64AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum64AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum64AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum64AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum64Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum64Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum64Collection)), source.GetCurrentValue>(nullableEnum8) == null ? null : ((ValueComparer>)nullableEnum8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum8)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum8Array)), source.GetCurrentValue>(nullableEnum8AsString) == null ? null : ((ValueComparer>)nullableEnum8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum8AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum8AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum8AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum8AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum8AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum8AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum8Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum8Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum8Collection)), source.GetCurrentValue>(nullableEnumU16) == null ? null : ((ValueComparer>)nullableEnumU16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU16)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16Array)), source.GetCurrentValue>(nullableEnumU16AsString) == null ? null : ((ValueComparer>)nullableEnumU16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU16AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU16AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU16AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU16AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU16Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU16Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU16Collection)), source.GetCurrentValue>(nullableEnumU32) == null ? null : ((ValueComparer>)nullableEnumU32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU32)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32Array)), source.GetCurrentValue>(nullableEnumU32AsString) == null ? null : ((ValueComparer>)nullableEnumU32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU32AsString))); + var liftedArg3 = (ISnapshot)new Snapshot, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable[][][], Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable>(source.GetCurrentValue>(nullableDateOnly) == null ? null : ((ValueComparer>)nullableDateOnly.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDateOnly)), (IEnumerable>)source.GetCurrentValue[]>(nullableDateOnlyArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDateOnlyArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDateOnlyArray)), source.GetCurrentValue>(nullableDateTime) == null ? null : ((ValueComparer>)nullableDateTime.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDateTime)), (IEnumerable>)source.GetCurrentValue[]>(nullableDateTimeArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDateTimeArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDateTimeArray)), source.GetCurrentValue>(nullableDecimal) == null ? null : ((ValueComparer>)nullableDecimal.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDecimal)), (IEnumerable>)source.GetCurrentValue[]>(nullableDecimalArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDecimalArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDecimalArray)), source.GetCurrentValue>(nullableDouble) == null ? null : ((ValueComparer>)nullableDouble.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableDouble)), (IEnumerable>)source.GetCurrentValue[]>(nullableDoubleArray) == null ? null : (Nullable[])((ValueComparer>>)nullableDoubleArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableDoubleArray)), source.GetCurrentValue>(nullableEnum16) == null ? null : ((ValueComparer>)nullableEnum16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum16)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum16Array)), source.GetCurrentValue>(nullableEnum16AsString) == null ? null : ((ValueComparer>)nullableEnum16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum16AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum16AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum16AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum16AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum16AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum16AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum16Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum16Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum16Collection)), source.GetCurrentValue>(nullableEnum32) == null ? null : ((ValueComparer>)nullableEnum32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum32)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum32Array)), source.GetCurrentValue>(nullableEnum32AsString) == null ? null : ((ValueComparer>)nullableEnum32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum32AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum32AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum32AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum32AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum32AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum32AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum32Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum32Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum32Collection)), (object)source.GetCurrentValue[][][]>(nullableEnum32NestedCollection) == null ? null : (Nullable[][][])((ValueComparer)nullableEnum32NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][][]>(nullableEnum32NestedCollection)), source.GetCurrentValue>(nullableEnum64) == null ? null : ((ValueComparer>)nullableEnum64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum64)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum64Array)), source.GetCurrentValue>(nullableEnum64AsString) == null ? null : ((ValueComparer>)nullableEnum64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum64AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum64AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum64AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum64AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum64AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum64AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum64Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum64Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum64Collection)), source.GetCurrentValue>(nullableEnum8) == null ? null : ((ValueComparer>)nullableEnum8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum8)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnum8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum8Array)), source.GetCurrentValue>(nullableEnum8AsString) == null ? null : ((ValueComparer>)nullableEnum8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnum8AsString))); var entity4 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg4 = (ISnapshot)new Snapshot[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], IPAddress, IPAddress[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], PhysicalAddress>((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU32AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU32AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU32AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU32Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU32Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU32Collection)), source.GetCurrentValue>(nullableEnumU64) == null ? null : ((ValueComparer>)nullableEnumU64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU64)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64Array)), source.GetCurrentValue>(nullableEnumU64AsString) == null ? null : ((ValueComparer>)nullableEnumU64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU64AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU64AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU64AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU64AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU64Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU64Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU64Collection)), source.GetCurrentValue>(nullableEnumU8) == null ? null : ((ValueComparer>)nullableEnumU8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU8)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8Array)), source.GetCurrentValue>(nullableEnumU8AsString) == null ? null : ((ValueComparer>)nullableEnumU8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU8AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU8AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU8AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU8AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU8Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU8Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU8Collection)), source.GetCurrentValue>(nullableFloat) == null ? null : ((ValueComparer>)nullableFloat.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableFloat)), (IEnumerable>)source.GetCurrentValue[]>(nullableFloatArray) == null ? null : (Nullable[])((ValueComparer>>)nullableFloatArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableFloatArray)), source.GetCurrentValue>(nullableGuid) == null ? null : ((ValueComparer>)nullableGuid.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableGuid)), (IEnumerable>)source.GetCurrentValue[]>(nullableGuidArray) == null ? null : (Nullable[])((ValueComparer>>)nullableGuidArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableGuidArray)), source.GetCurrentValue(nullableIPAddress) == null ? null : ((ValueComparer)nullableIPAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableIPAddress)), (IEnumerable)source.GetCurrentValue(nullableIPAddressArray) == null ? null : (IPAddress[])((ValueComparer>)nullableIPAddressArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(nullableIPAddressArray)), source.GetCurrentValue>(nullableInt16) == null ? null : ((ValueComparer>)nullableInt16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt16)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt16Array)), source.GetCurrentValue>(nullableInt32) == null ? null : ((ValueComparer>)nullableInt32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt32)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt32Array)), source.GetCurrentValue>(nullableInt64) == null ? null : ((ValueComparer>)nullableInt64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt64)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt64Array)), source.GetCurrentValue>(nullableInt8) == null ? null : ((ValueComparer>)nullableInt8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt8)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt8Array)), source.GetCurrentValue(nullablePhysicalAddress) == null ? null : ((ValueComparer)nullablePhysicalAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(nullablePhysicalAddress))); + var liftedArg4 = (ISnapshot)new Snapshot[], List>, List>, Nullable[][], Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable[][], Nullable, Nullable[], Nullable, Nullable[], List>, List>, Nullable>((IEnumerable>)source.GetCurrentValue[]>(nullableEnum8AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnum8AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnum8AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum8AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnum8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum8AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnum8Collection) == null ? null : (List>)((ValueComparer>>)nullableEnum8Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnum8Collection)), (object)source.GetCurrentValue[][]>(nullableEnum8NestedCollection) == null ? null : (Nullable[][])((ValueComparer)nullableEnum8NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>(nullableEnum8NestedCollection)), source.GetCurrentValue>(nullableEnumU16) == null ? null : ((ValueComparer>)nullableEnumU16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU16)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16Array)), source.GetCurrentValue>(nullableEnumU16AsString) == null ? null : ((ValueComparer>)nullableEnumU16AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU16AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU16AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU16AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU16AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU16AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU16AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU16Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU16Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU16Collection)), source.GetCurrentValue>(nullableEnumU32) == null ? null : ((ValueComparer>)nullableEnumU32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU32)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32Array)), source.GetCurrentValue>(nullableEnumU32AsString) == null ? null : ((ValueComparer>)nullableEnumU32AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU32AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU32AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU32AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU32AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU32AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU32AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU32Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU32Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU32Collection)), source.GetCurrentValue>(nullableEnumU64) == null ? null : ((ValueComparer>)nullableEnumU64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU64)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64Array)), source.GetCurrentValue>(nullableEnumU64AsString) == null ? null : ((ValueComparer>)nullableEnumU64AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU64AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU64AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU64AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU64AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU64AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU64AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU64Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU64Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU64Collection)), (object)source.GetCurrentValue[][]>(nullableEnumU64NestedCollection) == null ? null : (Nullable[][])((ValueComparer)nullableEnumU64NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>(nullableEnumU64NestedCollection)), source.GetCurrentValue>(nullableEnumU8) == null ? null : ((ValueComparer>)nullableEnumU8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU8)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8Array)), source.GetCurrentValue>(nullableEnumU8AsString) == null ? null : ((ValueComparer>)nullableEnumU8AsString.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableEnumU8AsString)), (IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8AsStringArray) == null ? null : (Nullable[])((ValueComparer>>)nullableEnumU8AsStringArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableEnumU8AsStringArray)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU8AsStringCollection) == null ? null : (List>)((ValueComparer>>)nullableEnumU8AsStringCollection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU8AsStringCollection)), (IEnumerable>)source.GetCurrentValue>>(nullableEnumU8Collection) == null ? null : (List>)((ValueComparer>>)nullableEnumU8Collection.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue>>(nullableEnumU8Collection)), source.GetCurrentValue>(nullableFloat) == null ? null : ((ValueComparer>)nullableFloat.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableFloat))); var entity5 = (CompiledModelTestBase.ManyTypes)source.Entity; - var liftedArg5 = (ISnapshot)new Snapshot, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Uri, Uri[], PhysicalAddress, PhysicalAddress[], PhysicalAddress, PhysicalAddress, string, string[], string, string, string, string, string, string, string>((IEnumerable)source.GetCurrentValue(nullablePhysicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer>)nullablePhysicalAddressArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(nullablePhysicalAddressArray)), source.GetCurrentValue(nullableString) == null ? null : ((ValueComparer)nullableString.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableString)), (IEnumerable)source.GetCurrentValue(nullableStringArray) == null ? null : (string[])((ValueComparer>)nullableStringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(nullableStringArray)), source.GetCurrentValue>(nullableTimeOnly) == null ? null : ((ValueComparer>)nullableTimeOnly.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableTimeOnly)), (IEnumerable>)source.GetCurrentValue[]>(nullableTimeOnlyArray) == null ? null : (Nullable[])((ValueComparer>>)nullableTimeOnlyArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableTimeOnlyArray)), source.GetCurrentValue>(nullableTimeSpan) == null ? null : ((ValueComparer>)nullableTimeSpan.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableTimeSpan)), (IEnumerable>)source.GetCurrentValue[]>(nullableTimeSpanArray) == null ? null : (Nullable[])((ValueComparer>>)nullableTimeSpanArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableTimeSpanArray)), source.GetCurrentValue>(nullableUInt16) == null ? null : ((ValueComparer>)nullableUInt16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt16)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt16Array)), source.GetCurrentValue>(nullableUInt32) == null ? null : ((ValueComparer>)nullableUInt32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt32)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt32Array)), source.GetCurrentValue>(nullableUInt64) == null ? null : ((ValueComparer>)nullableUInt64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt64)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt64Array)), source.GetCurrentValue>(nullableUInt8) == null ? null : ((ValueComparer>)nullableUInt8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt8)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt8Array)), source.GetCurrentValue(nullableUri) == null ? null : ((ValueComparer)nullableUri.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableUri)), (IEnumerable)source.GetCurrentValue(nullableUriArray) == null ? null : (Uri[])((ValueComparer>)nullableUriArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(nullableUriArray)), source.GetCurrentValue(physicalAddress) == null ? null : ((ValueComparer)physicalAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(physicalAddress)), (IEnumerable)source.GetCurrentValue(physicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer>)physicalAddressArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(physicalAddressArray)), source.GetCurrentValue(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer)physicalAddressToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(physicalAddressToBytesConverterProperty)), source.GetCurrentValue(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer)physicalAddressToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(physicalAddressToStringConverterProperty)), source.GetCurrentValue(@string) == null ? null : ((ValueComparer)@string.GetValueComparer()).Snapshot(source.GetCurrentValue(@string)), (IEnumerable)source.GetCurrentValue(stringArray) == null ? null : (string[])((ValueComparer>)stringArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(stringArray)), source.GetCurrentValue(stringToBoolConverterProperty) == null ? null : ((ValueComparer)stringToBoolConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToBoolConverterProperty)), source.GetCurrentValue(stringToBytesConverterProperty) == null ? null : ((ValueComparer)stringToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToBytesConverterProperty)), source.GetCurrentValue(stringToCharConverterProperty) == null ? null : ((ValueComparer)stringToCharConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToCharConverterProperty)), source.GetCurrentValue(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer)stringToDateOnlyConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDateOnlyConverterProperty)), source.GetCurrentValue(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer)stringToDateTimeConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDateTimeConverterProperty)), source.GetCurrentValue(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer)stringToDateTimeOffsetConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDateTimeOffsetConverterProperty)), source.GetCurrentValue(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer)stringToDecimalNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDecimalNumberConverterProperty))); + var liftedArg5 = (ISnapshot)new Snapshot[], Nullable, Nullable[], Nullable[][], IPAddress, IPAddress[], Nullable, Nullable[], Nullable, Nullable[], Nullable[][], Nullable, Nullable[], List[][]>, Nullable, Nullable[], PhysicalAddress, PhysicalAddress[], IEnumerable, string, string[], string[][], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[], Nullable, Nullable[]>((IEnumerable>)source.GetCurrentValue[]>(nullableFloatArray) == null ? null : (Nullable[])((ValueComparer>>)nullableFloatArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableFloatArray)), source.GetCurrentValue>(nullableGuid) == null ? null : ((ValueComparer>)nullableGuid.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableGuid)), (IEnumerable>)source.GetCurrentValue[]>(nullableGuidArray) == null ? null : (Nullable[])((ValueComparer>>)nullableGuidArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableGuidArray)), (object)source.GetCurrentValue[][]>(nullableGuidNestedCollection) == null ? null : (Nullable[][])((ValueComparer)nullableGuidNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>(nullableGuidNestedCollection)), source.GetCurrentValue(nullableIPAddress) == null ? null : ((ValueComparer)nullableIPAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableIPAddress)), (object)source.GetCurrentValue(nullableIPAddressArray) == null ? null : (IPAddress[])((ValueComparer)nullableIPAddressArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullableIPAddressArray)), source.GetCurrentValue>(nullableInt16) == null ? null : ((ValueComparer>)nullableInt16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt16)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt16Array)), source.GetCurrentValue>(nullableInt32) == null ? null : ((ValueComparer>)nullableInt32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt32)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt32Array)), (object)source.GetCurrentValue[][]>(nullableInt32NestedCollection) == null ? null : (Nullable[][])((ValueComparer)nullableInt32NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>(nullableInt32NestedCollection)), source.GetCurrentValue>(nullableInt64) == null ? null : ((ValueComparer>)nullableInt64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt64)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt64Array)), (object)source.GetCurrentValue[][]>>(nullableInt64NestedCollection) == null ? null : (List[][]>)((ValueComparer)nullableInt64NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>>(nullableInt64NestedCollection)), source.GetCurrentValue>(nullableInt8) == null ? null : ((ValueComparer>)nullableInt8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableInt8)), (IEnumerable>)source.GetCurrentValue[]>(nullableInt8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableInt8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableInt8Array)), source.GetCurrentValue(nullablePhysicalAddress) == null ? null : ((ValueComparer)nullablePhysicalAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(nullablePhysicalAddress)), (object)source.GetCurrentValue(nullablePhysicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer)nullablePhysicalAddressArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullablePhysicalAddressArray)), (object)source.GetCurrentValue>(nullablePhysicalAddressNestedCollection) == null ? null : (IEnumerable)((ValueComparer)nullablePhysicalAddressNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(nullablePhysicalAddressNestedCollection)), source.GetCurrentValue(nullableString) == null ? null : ((ValueComparer)nullableString.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableString)), (object)source.GetCurrentValue(nullableStringArray) == null ? null : (string[])((ValueComparer)nullableStringArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullableStringArray)), (object)source.GetCurrentValue(nullableStringNestedCollection) == null ? null : (string[][])((ValueComparer)nullableStringNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullableStringNestedCollection)), source.GetCurrentValue>(nullableTimeOnly) == null ? null : ((ValueComparer>)nullableTimeOnly.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableTimeOnly)), (IEnumerable>)source.GetCurrentValue[]>(nullableTimeOnlyArray) == null ? null : (Nullable[])((ValueComparer>>)nullableTimeOnlyArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableTimeOnlyArray)), source.GetCurrentValue>(nullableTimeSpan) == null ? null : ((ValueComparer>)nullableTimeSpan.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableTimeSpan)), (IEnumerable>)source.GetCurrentValue[]>(nullableTimeSpanArray) == null ? null : (Nullable[])((ValueComparer>>)nullableTimeSpanArray.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableTimeSpanArray)), source.GetCurrentValue>(nullableUInt16) == null ? null : ((ValueComparer>)nullableUInt16.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt16)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt16Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt16Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt16Array)), source.GetCurrentValue>(nullableUInt32) == null ? null : ((ValueComparer>)nullableUInt32.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt32)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt32Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt32Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt32Array))); var entity6 = (CompiledModelTestBase.ManyTypes)source.Entity; - return (ISnapshot)new MultiSnapshot(new ISnapshot[] { liftedArg, liftedArg0, liftedArg1, liftedArg2, liftedArg3, liftedArg4, liftedArg5, (ISnapshot)new Snapshot(source.GetCurrentValue(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer)stringToDoubleNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDoubleNumberConverterProperty)), source.GetCurrentValue(stringToEnumConverterProperty) == null ? null : ((ValueComparer)stringToEnumConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToEnumConverterProperty)), source.GetCurrentValue(stringToGuidConverterProperty) == null ? null : ((ValueComparer)stringToGuidConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToGuidConverterProperty)), source.GetCurrentValue(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer)stringToIntNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToIntNumberConverterProperty)), source.GetCurrentValue(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer)stringToTimeOnlyConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToTimeOnlyConverterProperty)), source.GetCurrentValue(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer)stringToTimeSpanConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToTimeSpanConverterProperty)), source.GetCurrentValue(stringToUriConverterProperty) == null ? null : ((ValueComparer)stringToUriConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToUriConverterProperty)), ((ValueComparer)timeOnly.GetValueComparer()).Snapshot(source.GetCurrentValue(timeOnly)), (IEnumerable)source.GetCurrentValue(timeOnlyArray) == null ? null : (TimeOnly[])((ValueComparer>)timeOnlyArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(timeOnlyArray)), ((ValueComparer)timeOnlyToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeOnlyToStringConverterProperty)), ((ValueComparer)timeOnlyToTicksConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeOnlyToTicksConverterProperty)), ((ValueComparer)timeSpan.GetValueComparer()).Snapshot(source.GetCurrentValue(timeSpan)), (IEnumerable)source.GetCurrentValue(timeSpanArray) == null ? null : (TimeSpan[])((ValueComparer>)timeSpanArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(timeSpanArray)), ((ValueComparer)timeSpanToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeSpanToStringConverterProperty)), ((ValueComparer)timeSpanToTicksConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeSpanToTicksConverterProperty)), ((ValueComparer)uInt16.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt16)), (IEnumerable)source.GetCurrentValue(uInt16Array) == null ? null : (ushort[])((ValueComparer>)uInt16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uInt16Array)), ((ValueComparer)uInt32.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt32)), (IEnumerable)source.GetCurrentValue(uInt32Array) == null ? null : (uint[])((ValueComparer>)uInt32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uInt32Array)), ((ValueComparer)uInt64.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt64)), (IEnumerable)source.GetCurrentValue(uInt64Array) == null ? null : (ulong[])((ValueComparer>)uInt64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uInt64Array)), ((ValueComparer)uInt8.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt8)), source.GetCurrentValue(uInt8Array) == null ? null : ((ValueComparer)uInt8Array.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt8Array)), source.GetCurrentValue(uri) == null ? null : ((ValueComparer)uri.GetValueComparer()).Snapshot(source.GetCurrentValue(uri)), (IEnumerable)source.GetCurrentValue(uriArray) == null ? null : (Uri[])((ValueComparer>)uriArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uriArray)), source.GetCurrentValue(uriToStringConverterProperty) == null ? null : ((ValueComparer)uriToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(uriToStringConverterProperty))) }); + var liftedArg6 = (ISnapshot)new Snapshot, Nullable[], Nullable, Nullable[], Nullable[][], Uri, Uri[], PhysicalAddress, PhysicalAddress[], PhysicalAddress, PhysicalAddress, string, string[], string[][], string, string, string, string, string, string, string, string, string, string, string, string, string, string, TimeOnly, TimeOnly[]>(source.GetCurrentValue>(nullableUInt64) == null ? null : ((ValueComparer>)nullableUInt64.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt64)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt64Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt64Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt64Array)), source.GetCurrentValue>(nullableUInt8) == null ? null : ((ValueComparer>)nullableUInt8.GetValueComparer()).Snapshot(source.GetCurrentValue>(nullableUInt8)), (IEnumerable>)source.GetCurrentValue[]>(nullableUInt8Array) == null ? null : (Nullable[])((ValueComparer>>)nullableUInt8Array.GetValueComparer()).Snapshot((IEnumerable>)source.GetCurrentValue[]>(nullableUInt8Array)), (object)source.GetCurrentValue[][]>(nullableUInt8NestedCollection) == null ? null : (Nullable[][])((ValueComparer)nullableUInt8NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue[][]>(nullableUInt8NestedCollection)), source.GetCurrentValue(nullableUri) == null ? null : ((ValueComparer)nullableUri.GetValueComparer()).Snapshot(source.GetCurrentValue(nullableUri)), (object)source.GetCurrentValue(nullableUriArray) == null ? null : (Uri[])((ValueComparer)nullableUriArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(nullableUriArray)), source.GetCurrentValue(physicalAddress) == null ? null : ((ValueComparer)physicalAddress.GetValueComparer()).Snapshot(source.GetCurrentValue(physicalAddress)), (object)source.GetCurrentValue(physicalAddressArray) == null ? null : (PhysicalAddress[])((ValueComparer)physicalAddressArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(physicalAddressArray)), source.GetCurrentValue(physicalAddressToBytesConverterProperty) == null ? null : ((ValueComparer)physicalAddressToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(physicalAddressToBytesConverterProperty)), source.GetCurrentValue(physicalAddressToStringConverterProperty) == null ? null : ((ValueComparer)physicalAddressToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(physicalAddressToStringConverterProperty)), source.GetCurrentValue(@string) == null ? null : ((ValueComparer)@string.GetValueComparer()).Snapshot(source.GetCurrentValue(@string)), (object)source.GetCurrentValue(stringArray) == null ? null : (string[])((ValueComparer)stringArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(stringArray)), (object)source.GetCurrentValue(stringNestedCollection) == null ? null : (string[][])((ValueComparer)stringNestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue(stringNestedCollection)), source.GetCurrentValue(stringToBoolConverterProperty) == null ? null : ((ValueComparer)stringToBoolConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToBoolConverterProperty)), source.GetCurrentValue(stringToBytesConverterProperty) == null ? null : ((ValueComparer)stringToBytesConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToBytesConverterProperty)), source.GetCurrentValue(stringToCharConverterProperty) == null ? null : ((ValueComparer)stringToCharConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToCharConverterProperty)), source.GetCurrentValue(stringToDateOnlyConverterProperty) == null ? null : ((ValueComparer)stringToDateOnlyConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDateOnlyConverterProperty)), source.GetCurrentValue(stringToDateTimeConverterProperty) == null ? null : ((ValueComparer)stringToDateTimeConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDateTimeConverterProperty)), source.GetCurrentValue(stringToDateTimeOffsetConverterProperty) == null ? null : ((ValueComparer)stringToDateTimeOffsetConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDateTimeOffsetConverterProperty)), source.GetCurrentValue(stringToDecimalNumberConverterProperty) == null ? null : ((ValueComparer)stringToDecimalNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDecimalNumberConverterProperty)), source.GetCurrentValue(stringToDoubleNumberConverterProperty) == null ? null : ((ValueComparer)stringToDoubleNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToDoubleNumberConverterProperty)), source.GetCurrentValue(stringToEnumConverterProperty) == null ? null : ((ValueComparer)stringToEnumConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToEnumConverterProperty)), source.GetCurrentValue(stringToGuidConverterProperty) == null ? null : ((ValueComparer)stringToGuidConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToGuidConverterProperty)), source.GetCurrentValue(stringToIntNumberConverterProperty) == null ? null : ((ValueComparer)stringToIntNumberConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToIntNumberConverterProperty)), source.GetCurrentValue(stringToTimeOnlyConverterProperty) == null ? null : ((ValueComparer)stringToTimeOnlyConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToTimeOnlyConverterProperty)), source.GetCurrentValue(stringToTimeSpanConverterProperty) == null ? null : ((ValueComparer)stringToTimeSpanConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToTimeSpanConverterProperty)), source.GetCurrentValue(stringToUriConverterProperty) == null ? null : ((ValueComparer)stringToUriConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(stringToUriConverterProperty)), ((ValueComparer)timeOnly.GetValueComparer()).Snapshot(source.GetCurrentValue(timeOnly)), (IEnumerable)source.GetCurrentValue(timeOnlyArray) == null ? null : (TimeOnly[])((ValueComparer>)timeOnlyArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(timeOnlyArray))); + var entity7 = (CompiledModelTestBase.ManyTypes)source.Entity; + return (ISnapshot)new MultiSnapshot(new ISnapshot[] { liftedArg, liftedArg0, liftedArg1, liftedArg2, liftedArg3, liftedArg4, liftedArg5, liftedArg6, (ISnapshot)new Snapshot, Uri, Uri[], Uri>(((ValueComparer)timeOnlyToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeOnlyToStringConverterProperty)), ((ValueComparer)timeOnlyToTicksConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeOnlyToTicksConverterProperty)), ((ValueComparer)timeSpan.GetValueComparer()).Snapshot(source.GetCurrentValue(timeSpan)), (IEnumerable)source.GetCurrentValue(timeSpanArray) == null ? null : (TimeSpan[])((ValueComparer>)timeSpanArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(timeSpanArray)), ((ValueComparer)timeSpanToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeSpanToStringConverterProperty)), ((ValueComparer)timeSpanToTicksConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(timeSpanToTicksConverterProperty)), ((ValueComparer)uInt16.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt16)), (IEnumerable)source.GetCurrentValue(uInt16Array) == null ? null : (ushort[])((ValueComparer>)uInt16Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uInt16Array)), ((ValueComparer)uInt32.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt32)), (IEnumerable)source.GetCurrentValue(uInt32Array) == null ? null : (uint[])((ValueComparer>)uInt32Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uInt32Array)), ((ValueComparer)uInt64.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt64)), (IEnumerable)source.GetCurrentValue(uInt64Array) == null ? null : (ulong[])((ValueComparer>)uInt64Array.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(uInt64Array)), ((ValueComparer)uInt8.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt8)), source.GetCurrentValue(uInt8Array) == null ? null : ((ValueComparer)uInt8Array.GetValueComparer()).Snapshot(source.GetCurrentValue(uInt8Array)), (object)source.GetCurrentValue>(uInt8NestedCollection) == null ? null : (List)((ValueComparer)uInt8NestedCollection.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(uInt8NestedCollection)), source.GetCurrentValue(uri) == null ? null : ((ValueComparer)uri.GetValueComparer()).Snapshot(source.GetCurrentValue(uri)), (object)source.GetCurrentValue(uriArray) == null ? null : (Uri[])((ValueComparer)uriArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(uriArray)), source.GetCurrentValue(uriToStringConverterProperty) == null ? null : ((ValueComparer)uriToStringConverterProperty.GetValueComparer()).Snapshot(source.GetCurrentValue(uriToStringConverterProperty))) }); }); runtimeEntityType.SetStoreGeneratedValuesFactory( () => (ISnapshot)new Snapshot(((ValueComparer)id.GetValueComparer()).Snapshot(default(CompiledModelTestBase.ManyTypesId)))); @@ -15018,10 +17403,10 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) return (ISnapshot)new Snapshot(((ValueComparer)id.GetKeyValueComparer()).Snapshot(source.GetCurrentValue(id))); }); runtimeEntityType.Counts = new PropertyCounts( - propertyCount: 236, + propertyCount: 258, navigationCount: 0, complexPropertyCount: 0, - originalValueCount: 236, + originalValueCount: 258, shadowCount: 0, relationshipCount: 1, storeGeneratedCount: 1); @@ -15064,6 +17449,15 @@ public static bool[] ReadBoolArray(CompiledModelTestBase.ManyTypes @this) public static void WriteBoolArray(CompiledModelTestBase.ManyTypes @this, bool[] value) => GetBoolArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref bool[][] GetBoolNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static bool[][] ReadBoolNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetBoolNestedCollection(@this); + + public static void WriteBoolNestedCollection(CompiledModelTestBase.ManyTypes @this, bool[][] value) + => GetBoolNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref bool GetBoolToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -15109,6 +17503,15 @@ public static byte[][] ReadBytesArray(CompiledModelTestBase.ManyTypes @this) public static void WriteBytesArray(CompiledModelTestBase.ManyTypes @this, byte[][] value) => GetBytesArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref byte[][][] GetBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static byte[][][] ReadBytesNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetBytesNestedCollection(@this); + + public static void WriteBytesNestedCollection(CompiledModelTestBase.ManyTypes @this, byte[][][] value) + => GetBytesNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref byte[] GetBytesToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -15145,6 +17548,15 @@ public static char[] ReadCharArray(CompiledModelTestBase.ManyTypes @this) public static void WriteCharArray(CompiledModelTestBase.ManyTypes @this, char[] value) => GetCharArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref char[][] GetCharNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static char[][] ReadCharNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetCharNestedCollection(@this); + + public static void WriteCharNestedCollection(CompiledModelTestBase.ManyTypes @this, char[][] value) + => GetCharNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref char GetCharToStringConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -15433,6 +17845,15 @@ public static void WriteEnum32AsStringCollection(CompiledModelTestBase.ManyTypes public static void WriteEnum32Collection(CompiledModelTestBase.ManyTypes @this, List value) => GetEnum32Collection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref List[][] GetEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static List[][] ReadEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetEnum32NestedCollection(@this); + + public static void WriteEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this, List[][] value) + => GetEnum32NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref CompiledModelTestBase.Enum64 GetEnum64(CompiledModelTestBase.ManyTypes @this); @@ -15541,6 +17962,15 @@ public static void WriteEnum8AsStringCollection(CompiledModelTestBase.ManyTypes public static void WriteEnum8Collection(CompiledModelTestBase.ManyTypes @this, List value) => GetEnum8Collection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref CompiledModelTestBase.Enum8[][] GetEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static CompiledModelTestBase.Enum8[][] ReadEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetEnum8NestedCollection(@this); + + public static void WriteEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this, CompiledModelTestBase.Enum8[][] value) + => GetEnum8NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref CompiledModelTestBase.Enum32 GetEnumToNumberConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -15721,6 +18151,15 @@ public static void WriteEnumU64AsStringCollection(CompiledModelTestBase.ManyType public static void WriteEnumU64Collection(CompiledModelTestBase.ManyTypes @this, List value) => GetEnumU64Collection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref CompiledModelTestBase.EnumU64[][] GetEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static CompiledModelTestBase.EnumU64[][] ReadEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetEnumU64NestedCollection(@this); + + public static void WriteEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this, CompiledModelTestBase.EnumU64[][] value) + => GetEnumU64NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref CompiledModelTestBase.EnumU8 GetEnumU8(CompiledModelTestBase.ManyTypes @this); @@ -15811,6 +18250,15 @@ public static Guid[] ReadGuidArray(CompiledModelTestBase.ManyTypes @this) public static void WriteGuidArray(CompiledModelTestBase.ManyTypes @this, Guid[] value) => GetGuidArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref ICollection GetGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static ICollection ReadGuidNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetGuidNestedCollection(@this); + + public static void WriteGuidNestedCollection(CompiledModelTestBase.ManyTypes @this, ICollection value) + => GetGuidNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref Guid GetGuidToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -15901,6 +18349,15 @@ public static int[] ReadInt32Array(CompiledModelTestBase.ManyTypes @this) public static void WriteInt32Array(CompiledModelTestBase.ManyTypes @this, int[] value) => GetInt32Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref int[][] GetInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static int[][] ReadInt32NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetInt32NestedCollection(@this); + + public static void WriteInt32NestedCollection(CompiledModelTestBase.ManyTypes @this, int[][] value) + => GetInt32NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref long GetInt64(CompiledModelTestBase.ManyTypes @this); @@ -15919,6 +18376,15 @@ public static long[] ReadInt64Array(CompiledModelTestBase.ManyTypes @this) public static void WriteInt64Array(CompiledModelTestBase.ManyTypes @this, long[] value) => GetInt64Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref IList[] GetInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static IList[] ReadInt64NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetInt64NestedCollection(@this); + + public static void WriteInt64NestedCollection(CompiledModelTestBase.ManyTypes @this, IList[] value) + => GetInt64NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref sbyte GetInt8(CompiledModelTestBase.ManyTypes @this); @@ -15937,6 +18403,15 @@ public static sbyte[] ReadInt8Array(CompiledModelTestBase.ManyTypes @this) public static void WriteInt8Array(CompiledModelTestBase.ManyTypes @this, sbyte[] value) => GetInt8Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref sbyte[][][] GetInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static sbyte[][][] ReadInt8NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetInt8NestedCollection(@this); + + public static void WriteInt8NestedCollection(CompiledModelTestBase.ManyTypes @this, sbyte[][][] value) + => GetInt8NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref int GetIntNumberToBytesConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -16000,6 +18475,15 @@ public static byte[][] ReadNullableBytesArray(CompiledModelTestBase.ManyTypes @t public static void WriteNullableBytesArray(CompiledModelTestBase.ManyTypes @this, byte[][] value) => GetNullableBytesArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref byte[][][] GetNullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static byte[][][] ReadNullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableBytesNestedCollection(@this); + + public static void WriteNullableBytesNestedCollection(CompiledModelTestBase.ManyTypes @this, byte[][][] value) + => GetNullableBytesNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref char? GetNullableChar(CompiledModelTestBase.ManyTypes @this); @@ -16198,6 +18682,15 @@ public static void WriteNullableEnum32AsStringCollection(CompiledModelTestBase.M public static void WriteNullableEnum32Collection(CompiledModelTestBase.ManyTypes @this, List value) => GetNullableEnum32Collection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref CompiledModelTestBase.Enum32?[][][] GetNullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static CompiledModelTestBase.Enum32?[][][] ReadNullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableEnum32NestedCollection(@this); + + public static void WriteNullableEnum32NestedCollection(CompiledModelTestBase.ManyTypes @this, CompiledModelTestBase.Enum32?[][][] value) + => GetNullableEnum32NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref CompiledModelTestBase.Enum64? GetNullableEnum64(CompiledModelTestBase.ManyTypes @this); @@ -16306,6 +18799,15 @@ public static void WriteNullableEnum8AsStringCollection(CompiledModelTestBase.Ma public static void WriteNullableEnum8Collection(CompiledModelTestBase.ManyTypes @this, List value) => GetNullableEnum8Collection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref CompiledModelTestBase.Enum8?[][] GetNullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static CompiledModelTestBase.Enum8?[][] ReadNullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableEnum8NestedCollection(@this); + + public static void WriteNullableEnum8NestedCollection(CompiledModelTestBase.ManyTypes @this, CompiledModelTestBase.Enum8?[][] value) + => GetNullableEnum8NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref CompiledModelTestBase.EnumU16? GetNullableEnumU16(CompiledModelTestBase.ManyTypes @this); @@ -16468,6 +18970,15 @@ public static void WriteNullableEnumU64AsStringCollection(CompiledModelTestBase. public static void WriteNullableEnumU64Collection(CompiledModelTestBase.ManyTypes @this, List value) => GetNullableEnumU64Collection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref CompiledModelTestBase.EnumU64?[][] GetNullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static CompiledModelTestBase.EnumU64?[][] ReadNullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableEnumU64NestedCollection(@this); + + public static void WriteNullableEnumU64NestedCollection(CompiledModelTestBase.ManyTypes @this, CompiledModelTestBase.EnumU64?[][] value) + => GetNullableEnumU64NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref CompiledModelTestBase.EnumU8? GetNullableEnumU8(CompiledModelTestBase.ManyTypes @this); @@ -16558,6 +19069,15 @@ public static void WriteNullableGuid(CompiledModelTestBase.ManyTypes @this, Guid public static void WriteNullableGuidArray(CompiledModelTestBase.ManyTypes @this, Guid?[] value) => GetNullableGuidArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref Guid?[][] GetNullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static Guid?[][] ReadNullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableGuidNestedCollection(@this); + + public static void WriteNullableGuidNestedCollection(CompiledModelTestBase.ManyTypes @this, Guid?[][] value) + => GetNullableGuidNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref IPAddress GetNullableIPAddress(CompiledModelTestBase.ManyTypes @this); @@ -16612,6 +19132,15 @@ public static void WriteNullableInt32(CompiledModelTestBase.ManyTypes @this, int public static void WriteNullableInt32Array(CompiledModelTestBase.ManyTypes @this, int?[] value) => GetNullableInt32Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref int?[][] GetNullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static int?[][] ReadNullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableInt32NestedCollection(@this); + + public static void WriteNullableInt32NestedCollection(CompiledModelTestBase.ManyTypes @this, int?[][] value) + => GetNullableInt32NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref long? GetNullableInt64(CompiledModelTestBase.ManyTypes @this); @@ -16630,6 +19159,15 @@ public static void WriteNullableInt64(CompiledModelTestBase.ManyTypes @this, lon public static void WriteNullableInt64Array(CompiledModelTestBase.ManyTypes @this, long?[] value) => GetNullableInt64Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref List GetNullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static List ReadNullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableInt64NestedCollection(@this); + + public static void WriteNullableInt64NestedCollection(CompiledModelTestBase.ManyTypes @this, List value) + => GetNullableInt64NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref sbyte? GetNullableInt8(CompiledModelTestBase.ManyTypes @this); @@ -16666,6 +19204,15 @@ public static PhysicalAddress[] ReadNullablePhysicalAddressArray(CompiledModelTe public static void WriteNullablePhysicalAddressArray(CompiledModelTestBase.ManyTypes @this, PhysicalAddress[] value) => GetNullablePhysicalAddressArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref IEnumerable GetNullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static IEnumerable ReadNullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullablePhysicalAddressNestedCollection(@this); + + public static void WriteNullablePhysicalAddressNestedCollection(CompiledModelTestBase.ManyTypes @this, IEnumerable value) + => GetNullablePhysicalAddressNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref string GetNullableString(CompiledModelTestBase.ManyTypes @this); @@ -16684,6 +19231,15 @@ public static string[] ReadNullableStringArray(CompiledModelTestBase.ManyTypes @ public static void WriteNullableStringArray(CompiledModelTestBase.ManyTypes @this, string[] value) => GetNullableStringArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref string[][] GetNullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static string[][] ReadNullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableStringNestedCollection(@this); + + public static void WriteNullableStringNestedCollection(CompiledModelTestBase.ManyTypes @this, string[][] value) + => GetNullableStringNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref TimeOnly? GetNullableTimeOnly(CompiledModelTestBase.ManyTypes @this); @@ -16792,6 +19348,15 @@ public static void WriteNullableUInt8(CompiledModelTestBase.ManyTypes @this, byt public static void WriteNullableUInt8Array(CompiledModelTestBase.ManyTypes @this, byte?[] value) => GetNullableUInt8Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref byte?[][] GetNullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static byte?[][] ReadNullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetNullableUInt8NestedCollection(@this); + + public static void WriteNullableUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this, byte?[][] value) + => GetNullableUInt8NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref Uri GetNullableUri(CompiledModelTestBase.ManyTypes @this); @@ -16864,6 +19429,15 @@ public static string[] ReadStringArray(CompiledModelTestBase.ManyTypes @this) public static void WriteStringArray(CompiledModelTestBase.ManyTypes @this, string[] value) => GetStringArray(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref string[][] GetStringNestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static string[][] ReadStringNestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetStringNestedCollection(@this); + + public static void WriteStringNestedCollection(CompiledModelTestBase.ManyTypes @this, string[][] value) + => GetStringNestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref string GetStringToBoolConverterProperty(CompiledModelTestBase.ManyTypes @this); @@ -17134,6 +19708,15 @@ public static byte[] ReadUInt8Array(CompiledModelTestBase.ManyTypes @this) public static void WriteUInt8Array(CompiledModelTestBase.ManyTypes @this, byte[] value) => GetUInt8Array(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] + extern static ref List GetUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this); + + public static List ReadUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this) + => GetUInt8NestedCollection(@this); + + public static void WriteUInt8NestedCollection(CompiledModelTestBase.ManyTypes @this, List value) + => GetUInt8NestedCollection(@this) = value; + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k__BackingField")] extern static ref Uri GetUri(CompiledModelTestBase.ManyTypes @this); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedType0EntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedType0EntityType.cs index d56818d9c40..9a584779a9d 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedType0EntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedType0EntityType.cs @@ -235,11 +235,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -251,14 +251,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -320,11 +320,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -336,10 +336,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -389,11 +389,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -405,10 +405,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -458,11 +458,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -474,14 +474,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, IPAddress>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, IPAddress>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -543,11 +543,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), @@ -559,10 +559,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -607,11 +607,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -623,10 +623,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -671,11 +671,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -687,10 +687,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -735,11 +735,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), @@ -751,10 +751,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, short>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, short>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -848,7 +848,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) (InternalEntityEntry source) => { var entity = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot, IList, List, DateTime[], IEnumerable, IList, List>(((ValueComparer)principalDerivedId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalDerivedId)), ((ValueComparer)principalDerivedAlternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalDerivedAlternateId)), ((ValueComparer)id.GetValueComparer()).Snapshot(source.GetCurrentValue(id)), source.GetCurrentValue(details) == null ? null : ((ValueComparer)details.GetValueComparer()).Snapshot(source.GetCurrentValue(details)), ((ValueComparer)number.GetValueComparer()).Snapshot(source.GetCurrentValue(number)), (IEnumerable)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer>)refTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(refTypeArray)), source.GetCurrentValue>(refTypeEnumerable) == null ? null : ((ValueComparer>)refTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(refTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer>)refTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeIList)), (IEnumerable)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer>)refTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); + return (ISnapshot)new Snapshot, IList, List, DateTime[], IEnumerable, IList, List>(((ValueComparer)principalDerivedId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalDerivedId)), ((ValueComparer)principalDerivedAlternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalDerivedAlternateId)), ((ValueComparer)id.GetValueComparer()).Snapshot(source.GetCurrentValue(id)), source.GetCurrentValue(details) == null ? null : ((ValueComparer)details.GetValueComparer()).Snapshot(source.GetCurrentValue(details)), ((ValueComparer)number.GetValueComparer()).Snapshot(source.GetCurrentValue(number)), (object)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer)refTypeArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray)), (object)source.GetCurrentValue>(refTypeEnumerable) == null ? null : (IEnumerable)((ValueComparer)refTypeEnumerable.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable)), (object)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer)refTypeIList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList)), (object)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer)refTypeList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( () => (ISnapshot)new Snapshot(((ValueComparer)principalDerivedId.GetValueComparer()).Snapshot(default(long)), ((ValueComparer)principalDerivedAlternateId.GetValueComparer()).Snapshot(default(Guid)), ((ValueComparer)id.GetValueComparer()).Snapshot(default(int)))); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeEntityType.cs index 678217daf74..dc471cc66d0 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/OwnedTypeEntityType.cs @@ -213,11 +213,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -229,14 +229,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -299,11 +299,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -315,10 +315,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -369,11 +369,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -385,10 +385,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -439,11 +439,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -455,14 +455,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, IPAddress>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, IPAddress>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -525,11 +525,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), @@ -541,10 +541,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -590,11 +590,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -606,10 +606,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -655,11 +655,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -671,10 +671,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -720,11 +720,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), @@ -736,10 +736,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, short>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, short>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -830,7 +830,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) (InternalEntityEntry source) => { var entity = (CompiledModelTestBase.OwnedType)source.Entity; - return (ISnapshot)new Snapshot, IList, List, DateTime[], IEnumerable, IList, List>(((ValueComparer)principalBaseId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalBaseId)), ((ValueComparer)principalBaseAlternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalBaseAlternateId)), source.GetCurrentValue(details) == null ? null : ((ValueComparer)details.GetValueComparer()).Snapshot(source.GetCurrentValue(details)), ((ValueComparer)number.GetValueComparer()).Snapshot(source.GetCurrentValue(number)), (IEnumerable)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer>)refTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(refTypeArray)), source.GetCurrentValue>(refTypeEnumerable) == null ? null : ((ValueComparer>)refTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(refTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer>)refTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeIList)), (IEnumerable)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer>)refTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); + return (ISnapshot)new Snapshot, IList, List, DateTime[], IEnumerable, IList, List>(((ValueComparer)principalBaseId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalBaseId)), ((ValueComparer)principalBaseAlternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(principalBaseAlternateId)), source.GetCurrentValue(details) == null ? null : ((ValueComparer)details.GetValueComparer()).Snapshot(source.GetCurrentValue(details)), ((ValueComparer)number.GetValueComparer()).Snapshot(source.GetCurrentValue(number)), (object)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer)refTypeArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray)), (object)source.GetCurrentValue>(refTypeEnumerable) == null ? null : (IEnumerable)((ValueComparer)refTypeEnumerable.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable)), (object)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer)refTypeIList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList)), (object)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer)refTypeList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( () => (ISnapshot)new Snapshot(((ValueComparer)principalBaseId.GetValueComparer()).Snapshot(default(long)), ((ValueComparer)principalBaseAlternateId.GetValueComparer()).Snapshot(default(Guid)))); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseEntityType.cs index d311943404d..7e8f5191bda 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalBaseEntityType.cs @@ -388,11 +388,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -404,14 +404,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -473,11 +473,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -489,10 +489,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -542,11 +542,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -558,10 +558,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -611,11 +611,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -627,14 +627,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, IPAddress>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, IPAddress>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -696,11 +696,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), @@ -712,10 +712,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -760,11 +760,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -776,10 +776,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -824,11 +824,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -840,10 +840,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -888,11 +888,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), @@ -904,10 +904,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, short>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, short>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -1012,7 +1012,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) (InternalEntityEntry source) => { var entity = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot, Guid, string, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), ((ValueComparer)alternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(alternateId)), source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)discriminator.GetValueComparer()).Snapshot(source.GetCurrentValue(discriminator)), ((ValueComparer)enum1.GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)enum2.GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)flagsEnum1.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)flagsEnum2.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), (IEnumerable)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer>)refTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(refTypeArray)), source.GetCurrentValue>(refTypeEnumerable) == null ? null : ((ValueComparer>)refTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(refTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer>)refTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeIList)), (IEnumerable)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer>)refTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); + return (ISnapshot)new Snapshot, Guid, string, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), ((ValueComparer)alternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(alternateId)), source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)discriminator.GetValueComparer()).Snapshot(source.GetCurrentValue(discriminator)), ((ValueComparer)enum1.GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)enum2.GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)flagsEnum1.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)flagsEnum2.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), (object)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer)refTypeArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray)), (object)source.GetCurrentValue>(refTypeEnumerable) == null ? null : (IEnumerable)((ValueComparer)refTypeEnumerable.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable)), (object)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer)refTypeIList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList)), (object)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer)refTypeList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( () => Snapshot.Empty); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedEntityType.cs index 8735fc70d54..2f87c96f6b2 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/BigModel_with_JSON_columns/PrincipalDerivedEntityType.cs @@ -108,7 +108,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) (InternalEntityEntry source) => { var entity = (CompiledModelTestBase.PrincipalDerived>>)source.Entity; - return (ISnapshot)new Snapshot, Guid, string, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), ((ValueComparer)alternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(alternateId)), source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)discriminator.GetValueComparer()).Snapshot(source.GetCurrentValue(discriminator)), ((ValueComparer)enum1.GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)enum2.GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)flagsEnum1.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)flagsEnum2.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), (IEnumerable)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer>)refTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(refTypeArray)), source.GetCurrentValue>(refTypeEnumerable) == null ? null : ((ValueComparer>)refTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(refTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer>)refTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeIList)), (IEnumerable)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer>)refTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); + return (ISnapshot)new Snapshot, Guid, string, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), ((ValueComparer)alternateId.GetValueComparer()).Snapshot(source.GetCurrentValue(alternateId)), source.GetCurrentValue(discriminator) == null ? null : ((ValueComparer)discriminator.GetValueComparer()).Snapshot(source.GetCurrentValue(discriminator)), ((ValueComparer)enum1.GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)enum2.GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)flagsEnum1.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)flagsEnum2.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), (object)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer)refTypeArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray)), (object)source.GetCurrentValue>(refTypeEnumerable) == null ? null : (IEnumerable)((ValueComparer)refTypeEnumerable.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable)), (object)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer)refTypeIList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList)), (object)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer)refTypeList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( () => Snapshot.Empty); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalBaseEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalBaseEntityType.cs index 5a9bef3533c..f16b72b2f5f 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalBaseEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalBaseEntityType.cs @@ -382,11 +382,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -398,14 +398,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -467,11 +467,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -483,10 +483,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -536,11 +536,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, string>(new ValueComparer( (string v1, string v2) => v1 == v2, (string v) => v.GetHashCode(), (string v) => v)), @@ -552,10 +552,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, string>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, string>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, string>( JsonStringReaderWriter.Instance), elementMapping: SqlServerStringTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -605,11 +605,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); refTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfReferenceTypesComparer, IPAddress>(new ValueComparer( (IPAddress v1, IPAddress v2) => v1 == null && v2 == null || v1 != null && v2 != null && v1.Equals(v2), (IPAddress v) => v.GetHashCode(), (IPAddress v) => v)), @@ -621,14 +621,14 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, IPAddress>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( (IPAddress v) => v.ToString(), (string v) => IPAddress.Parse(v))))), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, IPAddress>( + jsonValueReaderWriter: new JsonCollectionOfReferencesReaderWriter, IPAddress>( new JsonConvertedValueReaderWriter( JsonStringReaderWriter.Instance, new ValueConverter( @@ -690,11 +690,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeArray.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer(new ValueComparer( (DateTime v1, DateTime v2) => v1.Equals(v2), (DateTime v) => v.GetHashCode(), (DateTime v) => v)), @@ -706,10 +706,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter( JsonDateTimeReaderWriter.Instance), elementMapping: SqlServerDateTimeTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -754,11 +754,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeEnumerable.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -770,10 +770,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -818,11 +818,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeIList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, byte>(new ValueComparer( (byte v1, byte v2) => v1 == v2, (byte v) => (int)v, (byte v) => v)), @@ -834,10 +834,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, byte>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, byte>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, byte>( JsonByteReaderWriter.Instance), elementMapping: SqlServerByteTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -882,11 +882,11 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas relationshipIndex: -1, storeGenerationIndex: -1); valueTypeList.TypeMapping = SqlServerStringTypeMapping.Default.Clone( - comparer: new ListComparer(new ValueComparer( + comparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), - keyComparer: new ListComparer(new ValueComparer( + keyComparer: new ListOfValueTypesComparer, short>(new ValueComparer( (short v1, short v2) => v1 == v2, (short v) => (int)v, (short v) => v)), @@ -898,10 +898,10 @@ public static RuntimeEntityType Create(RuntimeModel model, RuntimeEntityType bas storeTypeName: "nvarchar(max)", unicode: true, dbType: System.Data.DbType.String), - converter: new CollectionToJsonStringConverter(new JsonCollectionReaderWriter, List, short>( + converter: new CollectionToJsonStringConverter(new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance)), storeTypePostfix: StoreTypePostfix.None, - jsonValueReaderWriter: new JsonCollectionReaderWriter, List, short>( + jsonValueReaderWriter: new JsonCollectionOfStructsReaderWriter, short>( JsonInt16ReaderWriter.Instance), elementMapping: SqlServerShortTypeMapping.Default.Clone( comparer: new ValueComparer( @@ -1043,7 +1043,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) (InternalEntityEntry source) => { var entity = (CompiledModelTestBase.PrincipalBase)source.Entity; - return (ISnapshot)new Snapshot, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Nullable, Nullable, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), ((ValueComparer)enum1.GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)enum2.GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)flagsEnum1.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)flagsEnum2.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), source.GetCurrentValue>(principalBaseId) == null ? null : ((ValueComparer>)principalBaseId.GetValueComparer()).Snapshot(source.GetCurrentValue>(principalBaseId)), source.GetCurrentValue>(principalDerivedId) == null ? null : ((ValueComparer>)principalDerivedId.GetValueComparer()).Snapshot(source.GetCurrentValue>(principalDerivedId)), (IEnumerable)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer>)refTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(refTypeArray)), source.GetCurrentValue>(refTypeEnumerable) == null ? null : ((ValueComparer>)refTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(refTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer>)refTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeIList)), (IEnumerable)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer>)refTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); + return (ISnapshot)new Snapshot, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Nullable, Nullable, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), ((ValueComparer)enum1.GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)enum2.GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)flagsEnum1.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)flagsEnum2.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), source.GetCurrentValue>(principalBaseId) == null ? null : ((ValueComparer>)principalBaseId.GetValueComparer()).Snapshot(source.GetCurrentValue>(principalBaseId)), source.GetCurrentValue>(principalDerivedId) == null ? null : ((ValueComparer>)principalDerivedId.GetValueComparer()).Snapshot(source.GetCurrentValue>(principalDerivedId)), (object)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer)refTypeArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray)), (object)source.GetCurrentValue>(refTypeEnumerable) == null ? null : (IEnumerable)((ValueComparer)refTypeEnumerable.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable)), (object)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer)refTypeIList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList)), (object)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer)refTypeList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( () => (ISnapshot)new Snapshot, Nullable>(((ValueComparer)enum1.GetValueComparer()).Snapshot(default(CompiledModelTestBase.AnEnum)), default(Nullable) == null ? null : ((ValueComparer>)principalBaseId.GetValueComparer()).Snapshot(default(Nullable)), default(Nullable) == null ? null : ((ValueComparer>)principalDerivedId.GetValueComparer()).Snapshot(default(Nullable)))); diff --git a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalDerivedEntityType.cs b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalDerivedEntityType.cs index eb02f91204d..193b0e2eff3 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalDerivedEntityType.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Scaffolding/Baselines/Tpc_Sprocs/PrincipalDerivedEntityType.cs @@ -54,7 +54,7 @@ public static void CreateAnnotations(RuntimeEntityType runtimeEntityType) (InternalEntityEntry source) => { var entity = (CompiledModelTestBase.PrincipalDerived>>)source.Entity; - return (ISnapshot)new Snapshot, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Nullable, Nullable, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), ((ValueComparer)enum1.GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)enum2.GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)flagsEnum1.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)flagsEnum2.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), source.GetCurrentValue>(principalBaseId) == null ? null : ((ValueComparer>)principalBaseId.GetValueComparer()).Snapshot(source.GetCurrentValue>(principalBaseId)), source.GetCurrentValue>(principalDerivedId) == null ? null : ((ValueComparer>)principalDerivedId.GetValueComparer()).Snapshot(source.GetCurrentValue>(principalDerivedId)), (IEnumerable)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer>)refTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(refTypeArray)), source.GetCurrentValue>(refTypeEnumerable) == null ? null : ((ValueComparer>)refTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(refTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer>)refTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeIList)), (IEnumerable)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer>)refTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); + return (ISnapshot)new Snapshot, CompiledModelTestBase.AnEnum, Nullable, CompiledModelTestBase.AFlagsEnum, CompiledModelTestBase.AFlagsEnum, Nullable, Nullable, IPAddress[], IEnumerable, IList, List, DateTime[], IEnumerable, IList, List>(source.GetCurrentValue>(id) == null ? null : ((ValueComparer>)id.GetValueComparer()).Snapshot(source.GetCurrentValue>(id)), ((ValueComparer)enum1.GetValueComparer()).Snapshot(source.GetCurrentValue(enum1)), source.GetCurrentValue>(enum2) == null ? null : ((ValueComparer>)enum2.GetValueComparer()).Snapshot(source.GetCurrentValue>(enum2)), ((ValueComparer)flagsEnum1.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum1)), ((ValueComparer)flagsEnum2.GetValueComparer()).Snapshot(source.GetCurrentValue(flagsEnum2)), source.GetCurrentValue>(principalBaseId) == null ? null : ((ValueComparer>)principalBaseId.GetValueComparer()).Snapshot(source.GetCurrentValue>(principalBaseId)), source.GetCurrentValue>(principalDerivedId) == null ? null : ((ValueComparer>)principalDerivedId.GetValueComparer()).Snapshot(source.GetCurrentValue>(principalDerivedId)), (object)source.GetCurrentValue(refTypeArray) == null ? null : (IPAddress[])((ValueComparer)refTypeArray.GetValueComparer()).Snapshot((object)source.GetCurrentValue(refTypeArray)), (object)source.GetCurrentValue>(refTypeEnumerable) == null ? null : (IEnumerable)((ValueComparer)refTypeEnumerable.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeEnumerable)), (object)source.GetCurrentValue>(refTypeIList) == null ? null : (IList)((ValueComparer)refTypeIList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeIList)), (object)source.GetCurrentValue>(refTypeList) == null ? null : (List)((ValueComparer)refTypeList.GetValueComparer()).Snapshot((object)source.GetCurrentValue>(refTypeList)), (IEnumerable)source.GetCurrentValue(valueTypeArray) == null ? null : (DateTime[])((ValueComparer>)valueTypeArray.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue(valueTypeArray)), source.GetCurrentValue>(valueTypeEnumerable) == null ? null : ((ValueComparer>)valueTypeEnumerable.GetValueComparer()).Snapshot(source.GetCurrentValue>(valueTypeEnumerable)), (IEnumerable)source.GetCurrentValue>(valueTypeIList) == null ? null : (IList)((ValueComparer>)valueTypeIList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeIList)), (IEnumerable)source.GetCurrentValue>(valueTypeList) == null ? null : (List)((ValueComparer>)valueTypeList.GetValueComparer()).Snapshot((IEnumerable)source.GetCurrentValue>(valueTypeList))); }); runtimeEntityType.SetStoreGeneratedValuesFactory( () => (ISnapshot)new Snapshot, Nullable>(((ValueComparer)enum1.GetValueComparer()).Snapshot(default(CompiledModelTestBase.AnEnum)), default(Nullable) == null ? null : ((ValueComparer>)principalBaseId.GetValueComparer()).Snapshot(default(Nullable)), default(Nullable) == null ? null : ((ValueComparer>)principalDerivedId.GetValueComparer()).Snapshot(default(Nullable)))); diff --git a/test/EFCore.SqlServer.FunctionalTests/Update/JsonUpdateSqlServerTest.cs b/test/EFCore.SqlServer.FunctionalTests/Update/JsonUpdateSqlServerTest.cs index 53f6f259ba8..eefe4504615 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Update/JsonUpdateSqlServerTest.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Update/JsonUpdateSqlServerTest.cs @@ -565,7 +565,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -589,7 +589,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -612,7 +612,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -636,7 +636,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -660,7 +660,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -684,7 +684,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -708,7 +708,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -732,7 +732,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -756,7 +756,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -780,7 +780,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -804,7 +804,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -828,7 +828,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -852,7 +852,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -876,7 +876,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -900,7 +900,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -924,7 +924,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -948,7 +948,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -972,7 +972,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -996,7 +996,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1020,7 +1020,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1044,7 +1044,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1068,7 +1068,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1092,7 +1092,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1116,7 +1116,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1140,7 +1140,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1164,7 +1164,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1188,7 +1188,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1200,8 +1200,8 @@ public override async Task Edit_two_properties_on_same_entity_updates_the_entire AssertSql( """ -@p0='{"TestBoolean":false,"TestBooleanCollection":[true,false],"TestByte":25,"TestByteCollection":null,"TestCharacter":"h","TestCharacterCollection":["A","B","\u0022"],"TestDateOnly":"2323-04-03","TestDateOnlyCollection":["3234-01-23","4331-01-21"],"TestDateTime":"2100-11-11T12:34:56","TestDateTimeCollection":["2000-01-01T12:34:56","3000-01-01T12:34:56"],"TestDateTimeOffset":"2200-11-11T12:34:56-05:00","TestDateTimeOffsetCollection":["2000-01-01T12:34:56-08:00"],"TestDecimal":-123450.01,"TestDecimalCollection":[-1234567890.01],"TestDefaultString":"MyDefaultStringInCollection1","TestDefaultStringCollection":["S1","\u0022S2\u0022","S3"],"TestDouble":-1.2345,"TestDoubleCollection":[-1.23456789,1.23456789,0],"TestEnum":-1,"TestEnumCollection":[-1,-3,-7],"TestEnumWithIntConverter":2,"TestEnumWithIntConverterCollection":[-1,-3,-7],"TestGuid":"00000000-0000-0000-0000-000000000000","TestGuidCollection":["12345678-1234-4321-7777-987654321000"],"TestInt16":-12,"TestInt16Collection":[-32768,0,32767],"TestInt32":32,"TestInt32Collection":[-2147483648,0,2147483647],"TestInt64":64,"TestInt64Collection":[-9223372036854775808,0,9223372036854775807],"TestMaxLengthString":"Baz","TestMaxLengthStringCollection":["S1","S2","S3"],"TestNullableEnum":-1,"TestNullableEnumCollection":[-1,null,-3,-7],"TestNullableEnumWithConverterThatHandlesNulls":"Two","TestNullableEnumWithConverterThatHandlesNullsCollection":[-1,null,-7],"TestNullableEnumWithIntConverter":-3,"TestNullableEnumWithIntConverterCollection":[-1,null,-3,-7],"TestNullableInt32":90,"TestNullableInt32Collection":[null,-2147483648,0,null,2147483647,null],"TestSignedByte":-18,"TestSignedByteCollection":[-128,0,127],"TestSingle":-1.4,"TestSingleCollection":[-1.234,0,-1.234],"TestTimeOnly":"05:07:08.0000000","TestTimeOnlyCollection":["13:42:23.0000000","07:17:25.0000000"],"TestTimeSpan":"6:05:04.003","TestTimeSpanCollection":["10:09:08.007","-9:50:51.993"],"TestUnsignedInt16":12,"TestUnsignedInt16Collection":[0,0,65535],"TestUnsignedInt32":12345,"TestUnsignedInt32Collection":[0,0,4294967295],"TestUnsignedInt64":1234567867,"TestUnsignedInt64Collection":[0,0,18446744073709551615]}' (Nullable = false) (Size = 2139) -@p1='{"TestBoolean":true,"TestBooleanCollection":[true,false],"TestByte":255,"TestByteCollection":null,"TestCharacter":"a","TestCharacterCollection":["A","B","\u0022"],"TestDateOnly":"2023-10-10","TestDateOnlyCollection":["1234-01-23","4321-01-21"],"TestDateTime":"2000-01-01T12:34:56","TestDateTimeCollection":["2000-01-01T12:34:56","3000-01-01T12:34:56"],"TestDateTimeOffset":"2000-01-01T12:34:56-08:00","TestDateTimeOffsetCollection":["2000-01-01T12:34:56-08:00"],"TestDecimal":-1234567890.01,"TestDecimalCollection":[-1234567890.01],"TestDefaultString":"MyDefaultStringInReference1","TestDefaultStringCollection":["S1","\u0022S2\u0022","S3"],"TestDouble":-1.23456789,"TestDoubleCollection":[-1.23456789,1.23456789,0],"TestEnum":-1,"TestEnumCollection":[-1,-3,-7],"TestEnumWithIntConverter":2,"TestEnumWithIntConverterCollection":[-1,-3,-7],"TestGuid":"12345678-1234-4321-7777-987654321000","TestGuidCollection":["12345678-1234-4321-7777-987654321000"],"TestInt16":-1234,"TestInt16Collection":[-32768,0,32767],"TestInt32":32,"TestInt32Collection":[-2147483648,0,2147483647],"TestInt64":64,"TestInt64Collection":[-9223372036854775808,0,9223372036854775807],"TestMaxLengthString":"Foo","TestMaxLengthStringCollection":["S1","S2","S3"],"TestNullableEnum":-1,"TestNullableEnumCollection":[-1,null,-3,-7],"TestNullableEnumWithConverterThatHandlesNulls":"Three","TestNullableEnumWithConverterThatHandlesNullsCollection":[-1,null,-7],"TestNullableEnumWithIntConverter":2,"TestNullableEnumWithIntConverterCollection":[-1,null,-3,-7],"TestNullableInt32":78,"TestNullableInt32Collection":[null,-2147483648,0,null,2147483647,null],"TestSignedByte":-128,"TestSignedByteCollection":[-128,0,127],"TestSingle":-1.234,"TestSingleCollection":[-1.234,0,-1.234],"TestTimeOnly":"11:12:13.0000000","TestTimeOnlyCollection":["11:42:23.0000000","07:17:27.0000000"],"TestTimeSpan":"10:09:08.007","TestTimeSpanCollection":["10:09:08.007","-9:50:51.993"],"TestUnsignedInt16":1234,"TestUnsignedInt16Collection":[0,0,65535],"TestUnsignedInt32":1234565789,"TestUnsignedInt32Collection":[0,0,4294967295],"TestUnsignedInt64":1234567890123456789,"TestUnsignedInt64Collection":[0,0,18446744073709551615]}' (Nullable = false) (Size = 2169) +@p0='{"TestBoolean":false,"TestBooleanCollection":[true,false],"TestBooleanCollectionCollection":[[true],null,[true,false]],"TestByte":25,"TestByteCollection":null,"TestCharacter":"h","TestCharacterCollection":["A","B","\u0022"],"TestCharacterCollectionCollection":[["A","B","C"],null,["D","E","F"]],"TestDateOnly":"2323-04-03","TestDateOnlyCollection":["3234-01-23","4331-01-21"],"TestDateTime":"2100-11-11T12:34:56","TestDateTimeCollection":["2000-01-01T12:34:56","3000-01-01T12:34:56"],"TestDateTimeOffset":"2200-11-11T12:34:56-05:00","TestDateTimeOffsetCollection":["2000-01-01T12:34:56-08:00"],"TestDecimal":-123450.01,"TestDecimalCollection":[-1234567890.01],"TestDefaultString":"MyDefaultStringInCollection1","TestDefaultStringCollection":["S1","\u0022S2\u0022","S3"],"TestDefaultStringCollectionCollection":[["S11","S12","S13"],null,["S21",null,"S23"]],"TestDouble":-1.2345,"TestDoubleCollection":[-1.23456789,1.23456789,0],"TestDoubleCollectionCollection":[[-1.23456789,-1.23456789],null,[1.23456789]],"TestEnum":-1,"TestEnumCollection":[-1,-3,-7],"TestEnumWithIntConverter":2,"TestEnumWithIntConverterCollection":[-1,-3,-7],"TestGuid":"00000000-0000-0000-0000-000000000000","TestGuidCollection":["12345678-1234-4321-7777-987654321000"],"TestInt16":-12,"TestInt16Collection":[-32768,0,32767],"TestInt16CollectionCollection":[[-32768,0,32767],null,[-32768,0,32767]],"TestInt32":32,"TestInt32Collection":[-2147483648,0,2147483647],"TestInt32CollectionCollection":[[-2147483648,0,2147483647],null,[-2147483648,0,2147483647]],"TestInt64":64,"TestInt64Collection":[-9223372036854775808,0,9223372036854775807],"TestInt64CollectionCollection":[[-9223372036854775808,0,9223372036854775807],null,[-9223372036854775808,0,9223372036854775807]],"TestMaxLengthString":"Baz","TestMaxLengthStringCollection":["S1","S2","S3"],"TestMaxLengthStringCollectionCollection":[["S11","S12","S13"],null,["S21",null,"S23"]],"TestNullableEnum":-1,"TestNullableEnumCollection":[-1,null,-3,-7],"TestNullableEnumCollectionCollection":[[null,[-1,null,-3,-7],null,[-1,null,-3,-7]],null],"TestNullableEnumWithConverterThatHandlesNulls":"Two","TestNullableEnumWithConverterThatHandlesNullsCollection":[-1,null,-7],"TestNullableEnumWithIntConverter":-3,"TestNullableEnumWithIntConverterCollection":[-1,null,-3,-7],"TestNullableEnumWithIntConverterCollectionCollection":[[null,[-1,null,-3,-7],null,[-1,null,-3,-7]],null],"TestNullableInt32":90,"TestNullableInt32Collection":[null,-2147483648,0,null,2147483647,null],"TestNullableInt32CollectionCollection":[null,[-2147483648,null,2147483647,null],null,[-2147483648,0,2147483647]],"TestSignedByte":-18,"TestSignedByteCollection":[-128,0,127],"TestSingle":-1.4,"TestSingleCollection":[-1.234,0,-1.234],"TestSingleCollectionCollection":[[-1.234,0,-1.234],null,[-1.234,0,-1.234]],"TestTimeOnly":"05:07:08.0000000","TestTimeOnlyCollection":["13:42:23.0000000","07:17:25.0000000"],"TestTimeSpan":"6:05:04.003","TestTimeSpanCollection":["10:09:08.007","-9:50:51.993"],"TestUnsignedInt16":12,"TestUnsignedInt16Collection":[0,0,65535],"TestUnsignedInt32":12345,"TestUnsignedInt32Collection":[0,0,4294967295],"TestUnsignedInt64":1234567867,"TestUnsignedInt64Collection":[0,0,18446744073709551615]}' (Nullable = false) (Size = 3205) +@p1='{"TestBoolean":true,"TestBooleanCollection":[true,false],"TestBooleanCollectionCollection":[[true],null,[true,false]],"TestByte":255,"TestByteCollection":null,"TestCharacter":"a","TestCharacterCollection":["A","B","\u0022"],"TestCharacterCollectionCollection":[["A","B","C"],null,["D","E","F"]],"TestDateOnly":"2023-10-10","TestDateOnlyCollection":["1234-01-23","4321-01-21"],"TestDateTime":"2000-01-01T12:34:56","TestDateTimeCollection":["2000-01-01T12:34:56","3000-01-01T12:34:56"],"TestDateTimeOffset":"2000-01-01T12:34:56-08:00","TestDateTimeOffsetCollection":["2000-01-01T12:34:56-08:00"],"TestDecimal":-1234567890.01,"TestDecimalCollection":[-1234567890.01],"TestDefaultString":"MyDefaultStringInReference1","TestDefaultStringCollection":["S1","\u0022S2\u0022","S3"],"TestDefaultStringCollectionCollection":[["S11","S12","S13"],null,["S21",null,"S23"]],"TestDouble":-1.23456789,"TestDoubleCollection":[-1.23456789,1.23456789,0],"TestDoubleCollectionCollection":[[-1.23456789,-1.23456789],null,[1.23456789]],"TestEnum":-1,"TestEnumCollection":[-1,-3,-7],"TestEnumWithIntConverter":2,"TestEnumWithIntConverterCollection":[-1,-3,-7],"TestGuid":"12345678-1234-4321-7777-987654321000","TestGuidCollection":["12345678-1234-4321-7777-987654321000"],"TestInt16":-1234,"TestInt16Collection":[-32768,0,32767],"TestInt16CollectionCollection":[[-32768,0,32767],null,[-32768,0,32767]],"TestInt32":32,"TestInt32Collection":[-2147483648,0,2147483647],"TestInt32CollectionCollection":[[-2147483648,0,2147483647],null,[-2147483648,0,2147483647]],"TestInt64":64,"TestInt64Collection":[-9223372036854775808,0,9223372036854775807],"TestInt64CollectionCollection":[[-9223372036854775808,0,9223372036854775807],null,[-9223372036854775808,0,9223372036854775807]],"TestMaxLengthString":"Foo","TestMaxLengthStringCollection":["S1","S2","S3"],"TestMaxLengthStringCollectionCollection":[["S11","S12","S13"],null,["S21",null,"S23"]],"TestNullableEnum":-1,"TestNullableEnumCollection":[-1,null,-3,-7],"TestNullableEnumCollectionCollection":[[null,[-1,null,-3,-7],null,[-1,null,-3,-7]],null],"TestNullableEnumWithConverterThatHandlesNulls":"Three","TestNullableEnumWithConverterThatHandlesNullsCollection":[-1,null,-7],"TestNullableEnumWithIntConverter":2,"TestNullableEnumWithIntConverterCollection":[-1,null,-3,-7],"TestNullableEnumWithIntConverterCollectionCollection":[[null,[-1,null,-3,-7],null,[-1,null,-3,-7]],null],"TestNullableInt32":78,"TestNullableInt32Collection":[null,-2147483648,0,null,2147483647,null],"TestNullableInt32CollectionCollection":[null,[-2147483648,null,2147483647,null],null,[-2147483648,0,2147483647]],"TestSignedByte":-128,"TestSignedByteCollection":[-128,0,127],"TestSingle":-1.234,"TestSingleCollection":[-1.234,0,-1.234],"TestSingleCollectionCollection":[[-1.234,0,-1.234],null,[-1.234,0,-1.234]],"TestTimeOnly":"11:12:13.0000000","TestTimeOnlyCollection":["11:42:23.0000000","07:17:27.0000000"],"TestTimeSpan":"10:09:08.007","TestTimeSpanCollection":["10:09:08.007","-9:50:51.993"],"TestUnsignedInt16":1234,"TestUnsignedInt16Collection":[0,0,65535],"TestUnsignedInt32":1234565789,"TestUnsignedInt32Collection":[0,0,4294967295],"TestUnsignedInt64":1234567890123456789,"TestUnsignedInt64Collection":[0,0,18446744073709551615]}' (Nullable = false) (Size = 3235) @p2='1' SET IMPLICIT_TRANSACTIONS OFF; @@ -1212,7 +1212,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1465,7 +1465,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1489,7 +1489,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1513,7 +1513,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1537,7 +1537,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1561,7 +1561,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1585,7 +1585,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1609,7 +1609,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1633,7 +1633,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1657,7 +1657,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1681,7 +1681,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1705,7 +1705,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1729,7 +1729,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1753,7 +1753,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1777,7 +1777,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1801,7 +1801,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1825,7 +1825,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1849,7 +1849,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1873,7 +1873,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1897,7 +1897,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1921,7 +1921,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1945,7 +1945,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1969,7 +1969,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -1993,7 +1993,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -2017,7 +2017,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -2041,7 +2041,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -2065,7 +2065,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -2089,7 +2089,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -2113,7 +2113,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -2137,7 +2137,7 @@ OUTPUT 1 """, // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 1 """); @@ -2412,9 +2412,9 @@ public override async Task Add_and_update_nested_optional_primitive_collection(b string parameterSize = value switch { - true => "1537", - false => "1534", - _ => "1536" + true => "2046", + false => "2043", + _ => "2045" }; string updateParameter = value switch @@ -2425,11 +2425,11 @@ public override async Task Add_and_update_nested_optional_primitive_collection(b }; AssertSql( - @"@p0='[{""TestBoolean"":false,""TestBooleanCollection"":[],""TestByte"":0,""TestByteCollection"":null,""TestCharacter"":""\u0000"",""TestCharacterCollection"":" + characterCollection + @",""TestDateOnly"":""0001-01-01"",""TestDateOnlyCollection"":[],""TestDateTime"":""0001-01-01T00:00:00"",""TestDateTimeCollection"":[],""TestDateTimeOffset"":""0001-01-01T00:00:00+00:00"",""TestDateTimeOffsetCollection"":[],""TestDecimal"":0,""TestDecimalCollection"":[],""TestDefaultString"":null,""TestDefaultStringCollection"":[],""TestDouble"":0,""TestDoubleCollection"":[],""TestEnum"":0,""TestEnumCollection"":[],""TestEnumWithIntConverter"":0,""TestEnumWithIntConverterCollection"":[],""TestGuid"":""00000000-0000-0000-0000-000000000000"",""TestGuidCollection"":[],""TestInt16"":0,""TestInt16Collection"":[],""TestInt32"":0,""TestInt32Collection"":[],""TestInt64"":0,""TestInt64Collection"":[],""TestMaxLengthString"":null,""TestMaxLengthStringCollection"":[],""TestNullableEnum"":null,""TestNullableEnumCollection"":[],""TestNullableEnumWithConverterThatHandlesNulls"":null,""TestNullableEnumWithConverterThatHandlesNullsCollection"":[],""TestNullableEnumWithIntConverter"":null,""TestNullableEnumWithIntConverterCollection"":[],""TestNullableInt32"":null,""TestNullableInt32Collection"":[],""TestSignedByte"":0,""TestSignedByteCollection"":[],""TestSingle"":0,""TestSingleCollection"":[],""TestTimeOnly"":""00:00:00.0000000"",""TestTimeOnlyCollection"":[],""TestTimeSpan"":""0:00:00"",""TestTimeSpanCollection"":[],""TestUnsignedInt16"":0,""TestUnsignedInt16Collection"":[],""TestUnsignedInt32"":0,""TestUnsignedInt32Collection"":[],""TestUnsignedInt64"":0,""TestUnsignedInt64Collection"":[]}]' (Nullable = false) (Size = " + parameterSize + @") + @"@p0='[{""TestBoolean"":false,""TestBooleanCollection"":[],""TestBooleanCollectionCollection"":[],""TestByte"":0,""TestByteCollection"":null,""TestCharacter"":""\u0000"",""TestCharacterCollection"":" + characterCollection + @",""TestCharacterCollectionCollection"":[],""TestDateOnly"":""0001-01-01"",""TestDateOnlyCollection"":[],""TestDateTime"":""0001-01-01T00:00:00"",""TestDateTimeCollection"":[],""TestDateTimeOffset"":""0001-01-01T00:00:00+00:00"",""TestDateTimeOffsetCollection"":[],""TestDecimal"":0,""TestDecimalCollection"":[],""TestDefaultString"":null,""TestDefaultStringCollection"":[],""TestDefaultStringCollectionCollection"":null,""TestDouble"":0,""TestDoubleCollection"":[],""TestDoubleCollectionCollection"":[],""TestEnum"":0,""TestEnumCollection"":[],""TestEnumWithIntConverter"":0,""TestEnumWithIntConverterCollection"":[],""TestGuid"":""00000000-0000-0000-0000-000000000000"",""TestGuidCollection"":[],""TestInt16"":0,""TestInt16Collection"":[],""TestInt16CollectionCollection"":null,""TestInt32"":0,""TestInt32Collection"":[],""TestInt32CollectionCollection"":[],""TestInt64"":0,""TestInt64Collection"":[],""TestInt64CollectionCollection"":[],""TestMaxLengthString"":null,""TestMaxLengthStringCollection"":[],""TestMaxLengthStringCollectionCollection"":null,""TestNullableEnum"":null,""TestNullableEnumCollection"":[],""TestNullableEnumCollectionCollection"":[],""TestNullableEnumWithConverterThatHandlesNulls"":null,""TestNullableEnumWithConverterThatHandlesNullsCollection"":[],""TestNullableEnumWithIntConverter"":null,""TestNullableEnumWithIntConverterCollection"":[],""TestNullableEnumWithIntConverterCollectionCollection"":[[[-3]]],""TestNullableInt32"":null,""TestNullableInt32Collection"":[],""TestNullableInt32CollectionCollection"":[[99]],""TestSignedByte"":0,""TestSignedByteCollection"":[],""TestSingle"":0,""TestSingleCollection"":[],""TestSingleCollectionCollection"":[[1.1,1.2]],""TestTimeOnly"":""00:00:00.0000000"",""TestTimeOnlyCollection"":[],""TestTimeSpan"":""0:00:00"",""TestTimeSpanCollection"":[],""TestUnsignedInt16"":0,""TestUnsignedInt16Collection"":[],""TestUnsignedInt32"":0,""TestUnsignedInt32Collection"":[],""TestUnsignedInt64"":0,""TestUnsignedInt64Collection"":[]}]' (Nullable = false) (Size = " + parameterSize + @") @p1='7624' @p2='[]' (Size = 4000) -@p3=NULL (Size = 8000) (DbType = Binary) -@p4='[]' (Size = 4000) +@p3='[]' (Size = 4000) +@p4=NULL (Size = 8000) (DbType = Binary) @p5='[]' (Size = 4000) @p6='[]' (Size = 4000) @p7='[]' (Size = 4000) @@ -2437,11 +2437,11 @@ public override async Task Add_and_update_nested_optional_primitive_collection(b @p9='[]' (Size = 4000) @p10='[]' (Size = 4000) @p11='[]' (Size = 4000) -@p12='[]' (Nullable = false) (Size = 4000) +@p12='[]' (Size = 4000) @p13='[]' (Size = 4000) @p14='[]' (Size = 4000) @p15='[]' (Size = 4000) -@p16='[]' (Size = 4000) +@p16='[]' (Nullable = false) (Size = 4000) @p17='[]' (Size = 4000) @p18='[]' (Size = 4000) @p19='[]' (Size = 4000) @@ -2452,14 +2452,26 @@ public override async Task Add_and_update_nested_optional_primitive_collection(b @p24='[]' (Size = 4000) @p25='[]' (Size = 4000) @p26='[]' (Size = 4000) - -SET IMPLICIT_TRANSACTIONS OFF; -SET NOCOUNT ON; -INSERT INTO [JsonEntitiesAllTypes] ([Collection], [Id], [TestBooleanCollection], [TestByteCollection], [TestCharacterCollection], [TestDateTimeCollection], [TestDateTimeOffsetCollection], [TestDecimalCollection], [TestDefaultStringCollection], [TestDoubleCollection], [TestEnumCollection], [TestEnumWithIntConverterCollection], [TestGuidCollection], [TestInt16Collection], [TestInt32Collection], [TestInt64Collection], [TestMaxLengthStringCollection], [TestNullableEnumCollection], [TestNullableEnumWithConverterThatHandlesNullsCollection], [TestNullableEnumWithIntConverterCollection], [TestNullableInt32Collection], [TestSignedByteCollection], [TestSingleCollection], [TestTimeSpanCollection], [TestUnsignedInt16Collection], [TestUnsignedInt32Collection], [TestUnsignedInt64Collection]) -VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23, @p24, @p25, @p26);", +@p27=NULL (Size = 4000) +@p28='[]' (Size = 4000) +@p29='[]' (Size = 4000) +@p30='[]' (Size = 4000) +@p31='[]' (Size = 4000) +@p32='[]' (Size = 4000) +@p33='[]' (Size = 4000) +@p34='[]' (Size = 4000) +@p35='[]' (Size = 4000) +@p36='[]' (Size = 4000) +@p37='[]' (Size = 4000) +@p38='[]' (Size = 4000) + +SET IMPLICIT_TRANSACTIONS OFF; +SET NOCOUNT ON; +INSERT INTO [JsonEntitiesAllTypes] ([Collection], [Id], [TestBooleanCollection], [TestBooleanCollectionCollection], [TestByteCollection], [TestCharacterCollection], [TestCharacterCollectionCollection], [TestDateTimeCollection], [TestDateTimeOffsetCollection], [TestDecimalCollection], [TestDefaultStringCollection], [TestDefaultStringCollectionCollection], [TestDoubleCollection], [TestDoubleCollectionCollection], [TestEnumCollection], [TestEnumWithIntConverterCollection], [TestGuidCollection], [TestInt16Collection], [TestInt16CollectionCollection], [TestInt32Collection], [TestInt32CollectionCollection], [TestInt64Collection], [TestInt64CollectionCollection], [TestMaxLengthStringCollection], [TestMaxLengthStringCollectionCollection], [TestNullableEnumCollection], [TestNullableEnumCollectionCollection], [TestNullableEnumWithConverterThatHandlesNullsCollection], [TestNullableEnumWithIntConverterCollection], [TestNullableEnumWithIntConverterCollectionCollection], [TestNullableInt32Collection], [TestNullableInt32CollectionCollection], [TestSignedByteCollection], [TestSingleCollection], [TestSingleCollectionCollection], [TestTimeSpanCollection], [TestUnsignedInt16Collection], [TestUnsignedInt32Collection], [TestUnsignedInt64Collection]) +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23, @p24, @p25, @p26, @p27, @p28, @p29, @p30, @p31, @p32, @p33, @p34, @p35, @p36, @p37, @p38);", // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 7624 """, @@ -2475,7 +2487,7 @@ OUTPUT 1 WHERE [Id] = @p1;", // """ -SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDoubleCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt32Collection], [j].[TestInt64Collection], [j].[TestMaxLengthStringCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableInt32Collection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] +SELECT TOP(2) [j].[Id], [j].[TestBooleanCollection], [j].[TestBooleanCollectionCollection], [j].[TestByteCollection], [j].[TestCharacterCollection], [j].[TestCharacterCollectionCollection], [j].[TestDateTimeCollection], [j].[TestDateTimeOffsetCollection], [j].[TestDecimalCollection], [j].[TestDefaultStringCollection], [j].[TestDefaultStringCollectionCollection], [j].[TestDoubleCollection], [j].[TestDoubleCollectionCollection], [j].[TestEnumCollection], [j].[TestEnumWithIntConverterCollection], [j].[TestGuidCollection], [j].[TestInt16Collection], [j].[TestInt16CollectionCollection], [j].[TestInt32Collection], [j].[TestInt32CollectionCollection], [j].[TestInt64Collection], [j].[TestInt64CollectionCollection], [j].[TestMaxLengthStringCollection], [j].[TestMaxLengthStringCollectionCollection], [j].[TestNullableEnumCollection], [j].[TestNullableEnumCollectionCollection], [j].[TestNullableEnumWithConverterThatHandlesNullsCollection], [j].[TestNullableEnumWithIntConverterCollection], [j].[TestNullableEnumWithIntConverterCollectionCollection], [j].[TestNullableInt32Collection], [j].[TestNullableInt32CollectionCollection], [j].[TestSignedByteCollection], [j].[TestSingleCollection], [j].[TestSingleCollectionCollection], [j].[TestTimeSpanCollection], [j].[TestUnsignedInt16Collection], [j].[TestUnsignedInt32Collection], [j].[TestUnsignedInt64Collection], [j].[Collection], [j].[Reference] FROM [JsonEntitiesAllTypes] AS [j] WHERE [j].[Id] = 7624 """); diff --git a/test/EFCore.Sqlite.FunctionalTests/JsonTypesSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/JsonTypesSqliteTest.cs index 6ded4822d55..1f03f1d708e 100644 --- a/test/EFCore.Sqlite.FunctionalTests/JsonTypesSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/JsonTypesSqliteTest.cs @@ -9,6 +9,24 @@ namespace Microsoft.EntityFrameworkCore; [SpatialiteRequired] public class JsonTypesSqliteTest : JsonTypesRelationalTestBase { + public override Task Can_read_write_array_of_list_of_GUID_JSON_values(string expected) + => base.Can_read_write_array_of_list_of_GUID_JSON_values("""{"Prop":[["00000000-0000-0000-0000-000000000000","8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"],[],["FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"]]}"""); + + public override Task Can_read_write_array_of_list_of_binary_JSON_values(string expected) + => base.Can_read_write_array_of_list_of_binary_JSON_values("""{"Prop":[["000102","01","4D"],[],["4E"]]}"""); + + public override Task Can_read_write_list_of_array_of_binary_JSON_values(string expected) + => base.Can_read_write_list_of_array_of_binary_JSON_values("""{"Prop":[["000102","01","4D"],[],["4E"]]}"""); + + public override Task Can_read_write_list_of_array_of_GUID_JSON_values(string expected) + => base.Can_read_write_list_of_array_of_GUID_JSON_values("""{"Prop":[["00000000-0000-0000-0000-000000000000","8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"],[],["FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"]]}"""); + + public override Task Can_read_write_list_of_array_of_list_of_array_of_binary_JSON_values(string expected) + => base.Can_read_write_list_of_array_of_list_of_array_of_binary_JSON_values("""{"Prop":[[[["000102","01","4D"]],[],[[],[]]],[],[[[]],[["000102","01","4D"]]]]}"""); + + public override Task Can_read_write_list_of_array_of_nullable_GUID_JSON_values(string expected) + => base.Can_read_write_list_of_array_of_nullable_GUID_JSON_values("""{"Prop":[["00000000-0000-0000-0000-000000000000",null,"8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"],[],["FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"]]}"""); + public override Task Can_read_write_binary_JSON_values(string value, string json) => base.Can_read_write_binary_JSON_values( value, value switch @@ -20,298 +38,141 @@ public override Task Can_read_write_binary_JSON_values(string value, string json _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) }); - [ConditionalFact] - public override Task Can_read_write_collection_of_decimal_JSON_values() - => Can_read_and_write_JSON_value>( - nameof(DecimalCollectionType.Decimal), - [ - decimal.MinValue, - 0, - decimal.MaxValue - ], - """{"Prop":["-79228162514264337593543950335.0","0.0","79228162514264337593543950335.0"]}""", - mappedCollection: true); - - [ConditionalFact] - public override Task Can_read_write_collection_of_DateTime_JSON_values() - => Can_read_and_write_JSON_value>( - nameof(DateTimeCollectionType.DateTime), - [ - DateTime.MinValue, - new(2023, 5, 29, 10, 52, 47), - DateTime.MaxValue - ], - """{"Prop":["0001-01-01 00:00:00","2023-05-29 10:52:47","9999-12-31 23:59:59.9999999"]}""", - mappedCollection: true); - - [ConditionalFact] - public override Task Can_read_write_collection_of_DateTimeOffset_JSON_values() - => Can_read_and_write_JSON_value>( - nameof(DateTimeOffsetCollectionType.DateTimeOffset), - [ - DateTimeOffset.MinValue, - new(new DateTime(2023, 5, 29, 10, 52, 47), new TimeSpan(-2, 0, 0)), - new(new DateTime(2023, 5, 29, 10, 52, 47), new TimeSpan(0, 0, 0)), - new(new DateTime(2023, 5, 29, 10, 52, 47), new TimeSpan(2, 0, 0)), - DateTimeOffset.MaxValue - ], - """{"Prop":["0001-01-01 00:00:00+00:00","2023-05-29 10:52:47-02:00","2023-05-29 10:52:47+00:00","2023-05-29 10:52:47+02:00","9999-12-31 23:59:59.9999999+00:00"]}""", - mappedCollection: true); - - [ConditionalFact] - public override Task Can_read_write_collection_of_GUID_JSON_values() - => Can_read_and_write_JSON_value>( - nameof(GuidCollectionType.Guid), - [ - new(), - new("8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"), - Guid.Parse("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF") - ], - """{"Prop":["00000000-0000-0000-0000-000000000000","8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD","FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"]}""", - mappedCollection: true); - - [ConditionalFact] - public override Task Can_read_write_collection_of_binary_JSON_values() - => Can_read_and_write_JSON_value>( - nameof(BytesCollectionType.Bytes), - [ - [0, 0, 0, 1], - [255, 255, 255, 255], - [], - [1, 2, 3, 4] - ], - """{"Prop":["00000001","FFFFFFFF","","01020304"]}""", - mappedCollection: true); - - [ConditionalFact] - public override Task Can_read_write_collection_of_decimal_with_precision_and_scale_JSON_values() - => Can_read_and_write_JSON_collection_value>( - b => b.ElementType().HasPrecision(12, 6), - nameof(DecimalCollectionType.Decimal), - [ - decimal.MinValue, - 0, - decimal.MaxValue - ], - """{"Prop":["-79228162514264337593543950335.0","0.0","79228162514264337593543950335.0"]}""", - facets: new Dictionary { { CoreAnnotationNames.Precision, 12 }, { CoreAnnotationNames.Scale, 6 } }); - - [ConditionalFact] - public override Task Can_read_write_collection_of_Guid_converted_to_bytes_JSON_values() - => Can_read_and_write_JSON_collection_value>( - b => b.ElementType().HasConversion(), - nameof(GuidCollectionType.Guid), - [ - new(), - new("8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"), - Guid.Parse("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF") - ], - """{"Prop":["00000000000000000000000000000000","2F24448C3F8E204A8BE898C7C1AADEBD","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"]}""", - facets: new Dictionary { { CoreAnnotationNames.ProviderClrType, typeof(byte[]) } }); + public override Task Can_read_write_collection_of_decimal_JSON_values(string expected) + => base.Can_read_write_collection_of_decimal_JSON_values("""{"Prop":["-79228162514264337593543950335.0","0.0","79228162514264337593543950335.0"]}"""); + + public override Task Can_read_write_collection_of_DateTime_JSON_values(string expected) + => base.Can_read_write_collection_of_DateTime_JSON_values("""{"Prop":["0001-01-01 00:00:00","2023-05-29 10:52:47","9999-12-31 23:59:59.9999999"]}"""); + + public override Task Can_read_write_collection_of_DateTimeOffset_JSON_values(string expected) + => base.Can_read_write_collection_of_DateTimeOffset_JSON_values("""{"Prop":["0001-01-01 00:00:00+00:00","2023-05-29 10:52:47-02:00","2023-05-29 10:52:47+00:00","2023-05-29 10:52:47+02:00","9999-12-31 23:59:59.9999999+00:00"]}"""); + + public override Task Can_read_write_collection_of_GUID_JSON_values(string expected) + => base.Can_read_write_collection_of_GUID_JSON_values("""{"Prop":["00000000-0000-0000-0000-000000000000","8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD","FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"]}"""); + + public override Task Can_read_write_collection_of_binary_JSON_values(string expected) + => base.Can_read_write_collection_of_binary_JSON_values("""{"Prop":["00000001","FFFFFFFF","","01020304"]}"""); + + public override Task Can_read_write_collection_of_decimal_with_precision_and_scale_JSON_values(string expected) + => base.Can_read_write_collection_of_decimal_with_precision_and_scale_JSON_values("""{"Prop":["-79228162514264337593543950335.0","0.0","79228162514264337593543950335.0"]}"""); + + public override Task Can_read_write_collection_of_Guid_converted_to_bytes_JSON_values(string expected) + => base.Can_read_write_collection_of_Guid_converted_to_bytes_JSON_values("""{"Prop":["00000000000000000000000000000000","2F24448C3F8E204A8BE898C7C1AADEBD","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"]}"""); public override Task Can_read_write_DateTime_JSON_values(string value, string json) - // Cannot override since the base test contains [InlineData] attributes which still apply, and which contain data we need - // to override. See Can_read_write_DateTime_JSON_values_sqlite instead. - => Task.CompletedTask; - - [ConditionalTheory] - [InlineData("0001-01-01T00:00:00.0000000", """{"Prop":"0001-01-01 00:00:00"}""")] - [InlineData("9999-12-31T23:59:59.9999999", """{"Prop":"9999-12-31 23:59:59.9999999"}""")] - [InlineData("2023-05-29T10:52:47.2064353", """{"Prop":"2023-05-29 10:52:47.2064353"}""")] - public virtual Task Can_read_write_DateTime_JSON_values_sqlite(string value, string json) - => Can_read_and_write_JSON_value( - nameof(DateTimeType.DateTime), - DateTime.Parse(value, CultureInfo.InvariantCulture), json); + => base.Can_read_write_DateTime_JSON_values( + value, value switch + { + "0001-01-01T00:00:00.0000000" => """{"Prop":"0001-01-01 00:00:00"}""", + "9999-12-31T23:59:59.9999999" => """{"Prop":"9999-12-31 23:59:59.9999999"}""", + "2023-05-29T10:52:47.2064353" => """{"Prop":"2023-05-29 10:52:47.2064353"}""", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }); public override Task Can_read_write_DateTimeOffset_JSON_values(string value, string json) - // Cannot override since the base test contains [InlineData] attributes which still apply, and which contain data we need - // to override. See Can_read_write_DateTimeOffset_JSON_values_sqlite instead. - => Task.CompletedTask; - - [ConditionalTheory] - [InlineData("0001-01-01T00:00:00.0000000-01:00", """{"Prop":"0001-01-01 00:00:00-01:00"}""")] - [InlineData("9999-12-31T23:59:59.9999999+02:00", """{"Prop":"9999-12-31 23:59:59.9999999+02:00"}""")] - [InlineData("0001-01-01T00:00:00.0000000-03:00", """{"Prop":"0001-01-01 00:00:00-03:00"}""")] - [InlineData("2023-05-29T11:11:15.5672854+04:00", """{"Prop":"2023-05-29 11:11:15.5672854+04:00"}""")] - public virtual Task Can_read_write_DateTimeOffset_JSON_values_sqlite(string value, string json) - => Can_read_and_write_JSON_value( - nameof(DateTimeOffsetType.DateTimeOffset), - DateTimeOffset.Parse(value, CultureInfo.InvariantCulture), json); + => base.Can_read_write_DateTimeOffset_JSON_values( + value, value switch + { + "0001-01-01T00:00:00.0000000-01:00" => """{"Prop":"0001-01-01 00:00:00-01:00"}""", + "9999-12-31T23:59:59.9999999+02:00" => """{"Prop":"9999-12-31 23:59:59.9999999+02:00"}""", + "0001-01-01T00:00:00.0000000-03:00" => """{"Prop":"0001-01-01 00:00:00-03:00"}""", + "2023-05-29T11:11:15.5672854+04:00" => """{"Prop":"2023-05-29 11:11:15.5672854+04:00"}""", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }); public override Task Can_read_write_decimal_JSON_values(decimal value, string json) - // Cannot override since the base test contains [InlineData] attributes which still apply, and which contain data we need - // to override. See Can_read_write_decimal_JSON_values_sqlite instead. - => Task.CompletedTask; - - [ConditionalTheory] - [InlineData("-79228162514264337593543950335", """{"Prop":"-79228162514264337593543950335.0"}""")] - [InlineData("79228162514264337593543950335", """{"Prop":"79228162514264337593543950335.0"}""")] - [InlineData("0.0", """{"Prop":"0.0"}""")] - [InlineData("1.1", """{"Prop":"1.1"}""")] - public virtual Task Can_read_write_decimal_JSON_values_sqlite(decimal value, string json) - => Can_read_and_write_JSON_value(nameof(DecimalType.Decimal), value, json); - - public override Task Can_read_write_GUID_JSON_values(Guid value, string json) - // Cannot override since the base test contains [InlineData] attributes which still apply, and which contain data we need - // to override. See Can_read_write_GUID_JSON_values_sqlite instead. - => Task.CompletedTask; - - [ConditionalTheory] - [InlineData("00000000-0000-0000-0000-000000000000", """{"Prop":"00000000-0000-0000-0000-000000000000"}""")] - [InlineData("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF", """{"Prop":"FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"}""")] - [InlineData("8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD", """{"Prop":"8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"}""")] - public virtual Task Can_read_write_GUID_JSON_values_sqlite(Guid value, string json) - => Can_read_and_write_JSON_value(nameof(GuidType.Guid), value, json); + => base.Can_read_write_decimal_JSON_values( + value, value switch + { + -79228162514264337593543950335m => """{"Prop":"-79228162514264337593543950335.0"}""", + 79228162514264337593543950335m => """{"Prop":"79228162514264337593543950335.0"}""", + 0.0m => """{"Prop":"0.0"}""", + 1.1m => """{"Prop":"1.1"}""", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }); + + public override Task Can_read_write_GUID_JSON_values(string value, string json) + => base.Can_read_write_GUID_JSON_values( + value, value switch + { + "00000000-0000-0000-0000-000000000000" => """{"Prop":"00000000-0000-0000-0000-000000000000"}""", + "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF" => """{"Prop":"FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"}""", + "8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD" => """{"Prop":"8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"}""", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }); public override Task Can_read_write_nullable_binary_JSON_values(string? value, string json) - // Cannot override since the base test contains [InlineData] attributes which still apply, and which contain data we need - // to override. See Can_read_write_nullable_binary_JSON_values_sqlite instead. - => Task.CompletedTask; - - [ConditionalTheory] - [InlineData("0,0,0,1", """{"Prop":"00000001"}""")] - [InlineData("255,255,255,255", """{"Prop":"FFFFFFFF"}""")] - [InlineData("", """{"Prop":""}""")] - [InlineData("1,2,3,4", """{"Prop":"01020304"}""")] - [InlineData(null, """{"Prop":null}""")] - public virtual Task Can_read_write_nullable_binary_JSON_values_sqlite(string? value, string json) - => Can_read_and_write_JSON_value( - nameof(NullableBytesType.Bytes), - value == null - ? default - : value == "" - ? [] - : value.Split(',').Select(e => byte.Parse(e)).ToArray(), json); + => base.Can_read_write_nullable_binary_JSON_values( + value, value switch + { + "0,0,0,1" => """{"Prop":"00000001"}""", + "255,255,255,255" => """{"Prop":"FFFFFFFF"}""", + "" => """{"Prop":""}""", + "1,2,3,4" => """{"Prop":"01020304"}""", + null => """{"Prop":null}""", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }); public override Task Can_read_write_nullable_DateTime_JSON_values(string? value, string json) - // Cannot override since the base test contains [InlineData] attributes which still apply, and which contain data we need - // to override. See Can_read_write_nullable_DateTime_JSON_values_sqlite instead. - => Task.CompletedTask; - - [ConditionalTheory] - [InlineData("0001-01-01T00:00:00.0000000", """{"Prop":"0001-01-01 00:00:00"}""")] - [InlineData("9999-12-31T23:59:59.9999999", """{"Prop":"9999-12-31 23:59:59.9999999"}""")] - [InlineData("2023-05-29T10:52:47.2064353", """{"Prop":"2023-05-29 10:52:47.2064353"}""")] - [InlineData(null, """{"Prop":null}""")] - public virtual Task Can_read_write_nullable_DateTime_JSON_values_sqlite(string? value, string json) - => Can_read_and_write_JSON_value( - nameof(NullableDateTimeType.DateTime), - value == null ? default(DateTime?) : DateTime.Parse(value, CultureInfo.InvariantCulture), json); + => base.Can_read_write_nullable_DateTime_JSON_values( + value, value switch + { + "0001-01-01T00:00:00.0000000" => """{"Prop":"0001-01-01 00:00:00"}""", + "9999-12-31T23:59:59.9999999" => """{"Prop":"9999-12-31 23:59:59.9999999"}""", + "2023-05-29T10:52:47.2064353" => """{"Prop":"2023-05-29 10:52:47.2064353"}""", + null => """{"Prop":null}""", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }); public override Task Can_read_write_nullable_DateTimeOffset_JSON_values(string? value, string json) - // Cannot override since the base test contains [InlineData] attributes which still apply, and which contain data we need - // to override. See Can_read_write_nullable_DateTimeOffset_JSON_values_sqlite instead. - => Task.CompletedTask; - - [ConditionalTheory] - [InlineData("0001-01-01T00:00:00.0000000-01:00", """{"Prop":"0001-01-01 00:00:00-01:00"}""")] - [InlineData("9999-12-31T23:59:59.9999999+02:00", """{"Prop":"9999-12-31 23:59:59.9999999+02:00"}""")] - [InlineData("0001-01-01T00:00:00.0000000-03:00", """{"Prop":"0001-01-01 00:00:00-03:00"}""")] - [InlineData("2023-05-29T11:11:15.5672854+04:00", """{"Prop":"2023-05-29 11:11:15.5672854+04:00"}""")] - [InlineData(null, """{"Prop":null}""")] - public virtual Task Can_read_write_nullable_DateTimeOffset_JSON_values_sqlite(string? value, string json) - => Can_read_and_write_JSON_value( - nameof(NullableDateTimeOffsetType.DateTimeOffset), - value == null ? default(DateTimeOffset?) : DateTimeOffset.Parse(value, CultureInfo.InvariantCulture), json); + => base.Can_read_write_nullable_DateTimeOffset_JSON_values( + value, value switch + { + "0001-01-01T00:00:00.0000000-01:00" => """{"Prop":"0001-01-01 00:00:00-01:00"}""", + "9999-12-31T23:59:59.9999999+02:00" => """{"Prop":"9999-12-31 23:59:59.9999999+02:00"}""", + "0001-01-01T00:00:00.0000000-03:00" => """{"Prop":"0001-01-01 00:00:00-03:00"}""", + "2023-05-29T11:11:15.5672854+04:00" => """{"Prop":"2023-05-29 11:11:15.5672854+04:00"}""", + null => """{"Prop":null}""", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }); public override Task Can_read_write_nullable_decimal_JSON_values(string? value, string json) - // Cannot override since the base test contains [InlineData] attributes which still apply, and which contain data we need - // to override. See Can_read_write_nullable_decimal_JSON_values_sqlite instead. - => Task.CompletedTask; - - [ConditionalTheory] - [InlineData("-79228162514264337593543950335", """{"Prop":"-79228162514264337593543950335.0"}""")] - [InlineData("79228162514264337593543950335", """{"Prop":"79228162514264337593543950335.0"}""")] - [InlineData("0.0", """{"Prop":"0.0"}""")] - [InlineData("1.1", """{"Prop":"1.1"}""")] - [InlineData(null, """{"Prop":null}""")] - public virtual Task Can_read_write_nullable_decimal_JSON_values_sqlite(string? value, string json) - => Can_read_and_write_JSON_value( - nameof(NullableDecimalType.Decimal), - value == null ? default(decimal?) : decimal.Parse(value, CultureInfo.InvariantCulture), json); + => base.Can_read_write_nullable_decimal_JSON_values( + value, value switch + { + "-79228162514264337593543950335" => """{"Prop":"-79228162514264337593543950335.0"}""", + "79228162514264337593543950335" => """{"Prop":"79228162514264337593543950335.0"}""", + "0.0" => """{"Prop":"0.0"}""", + "1.1" => """{"Prop":"1.1"}""", + null => """{"Prop":null}""", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }); public override Task Can_read_write_nullable_GUID_JSON_values(string? value, string json) - // Cannot override since the base test contains [InlineData] attributes which still apply, and which contain data we need - // to override. See Can_read_write_nullable_GUID_JSON_values_sqlite instead. - => Task.CompletedTask; - - [ConditionalTheory] - [InlineData("00000000-0000-0000-0000-000000000000", """{"Prop":"00000000-0000-0000-0000-000000000000"}""")] - [InlineData("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF", """{"Prop":"FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"}""")] - [InlineData("8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD", """{"Prop":"8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"}""")] - [InlineData(null, """{"Prop":null}""")] - public virtual Task Can_read_write_nullable_GUID_JSON_values_sqlite(string? value, string json) - => Can_read_and_write_JSON_value( - nameof(NullableGuidType.Guid), - value == null ? null : Guid.Parse(value, CultureInfo.InvariantCulture), json); - - [ConditionalFact] - public override Task Can_read_write_collection_of_nullable_binary_JSON_values() - => Can_read_and_write_JSON_value>( - nameof(NullableBytesCollectionType.Bytes), - [ - [0, 0, 0, 1], - null, - [255, 255, 255, 255], - [], - [1, 2, 3, 4] - ], - """{"Prop":["00000001",null,"FFFFFFFF","","01020304"]}""", - mappedCollection: true); - - [ConditionalFact] - public override Task Can_read_write_collection_of_nullable_DateTime_JSON_values() - => Can_read_and_write_JSON_value>( - nameof(NullableDateTimeCollectionType.DateTime), - [ - DateTime.MinValue, - null, - new(2023, 5, 29, 10, 52, 47), - DateTime.MaxValue - ], - """{"Prop":["0001-01-01 00:00:00",null,"2023-05-29 10:52:47","9999-12-31 23:59:59.9999999"]}""", - mappedCollection: true); - - [ConditionalFact] - public override Task Can_read_write_collection_of_nullable_DateTimeOffset_JSON_values() - => Can_read_and_write_JSON_value>( - nameof(NullableDateTimeOffsetCollectionType.DateTimeOffset), - [ - DateTimeOffset.MinValue, - new(new DateTime(2023, 5, 29, 10, 52, 47), new TimeSpan(-2, 0, 0)), - new(new DateTime(2023, 5, 29, 10, 52, 47), new TimeSpan(0, 0, 0)), - null, - new(new DateTime(2023, 5, 29, 10, 52, 47), new TimeSpan(2, 0, 0)), - DateTimeOffset.MaxValue - ], - """{"Prop":["0001-01-01 00:00:00+00:00","2023-05-29 10:52:47-02:00","2023-05-29 10:52:47+00:00",null,"2023-05-29 10:52:47+02:00","9999-12-31 23:59:59.9999999+00:00"]}""", - mappedCollection: true); - - [ConditionalFact] - public override Task Can_read_write_collection_of_nullable_decimal_JSON_values() - => Can_read_and_write_JSON_value>( - nameof(NullableDecimalCollectionType.Decimal), - [ - decimal.MinValue, - 0, - null, - decimal.MaxValue - ], - """{"Prop":["-79228162514264337593543950335.0","0.0",null,"79228162514264337593543950335.0"]}""", - mappedCollection: true); - - [ConditionalFact] - public override Task Can_read_write_collection_of_nullable_GUID_JSON_values() - => Can_read_and_write_JSON_value>( - nameof(NullableGuidCollectionType.Guid), - [ - new(), - null, - new("8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"), - Guid.Parse("FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF") - ], - """{"Prop":["00000000-0000-0000-0000-000000000000",null,"8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD","FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"]}""", - mappedCollection: true); + => base.Can_read_write_nullable_GUID_JSON_values( + value, value switch + { + "00000000-0000-0000-0000-000000000000" => """{"Prop":"00000000-0000-0000-0000-000000000000"}""", + "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF" => """{"Prop":"FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"}""", + "8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD" => """{"Prop":"8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD"}""", + null => """{"Prop":null}""", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }); + + public override Task Can_read_write_collection_of_nullable_binary_JSON_values(string expected) + => base.Can_read_write_collection_of_nullable_binary_JSON_values("""{"Prop":["00000001",null,"FFFFFFFF","","01020304"]}"""); + + public override Task Can_read_write_collection_of_nullable_DateTime_JSON_values(string expected) + => base.Can_read_write_collection_of_nullable_DateTime_JSON_values("""{"Prop":["0001-01-01 00:00:00",null,"2023-05-29 10:52:47","9999-12-31 23:59:59.9999999"]}"""); + + public override Task Can_read_write_collection_of_nullable_DateTimeOffset_JSON_values(string expected) + => base.Can_read_write_collection_of_nullable_DateTimeOffset_JSON_values("""{"Prop":["0001-01-01 00:00:00+00:00","2023-05-29 10:52:47-02:00","2023-05-29 10:52:47+00:00",null,"2023-05-29 10:52:47+02:00","9999-12-31 23:59:59.9999999+00:00"]}"""); + + public override Task Can_read_write_collection_of_nullable_decimal_JSON_values(string expected) + => base.Can_read_write_collection_of_nullable_decimal_JSON_values("""{"Prop":["-79228162514264337593543950335.0","0.0",null,"79228162514264337593543950335.0"]}"""); + + public override Task Can_read_write_collection_of_nullable_GUID_JSON_values(string expected) + => base.Can_read_write_collection_of_nullable_GUID_JSON_values("""{"Prop":["00000000-0000-0000-0000-000000000000",null,"8C44242F-8E3F-4A20-8BE8-98C7C1AADEBD","FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF"]}"""); protected override ITestStoreFactory TestStoreFactory => SqliteTestStoreFactory.Instance; diff --git a/test/EFCore.Sqlite.FunctionalTests/ModelBuilding/SqliteModelBuilderGenericTest.cs b/test/EFCore.Sqlite.FunctionalTests/ModelBuilding/SqliteModelBuilderGenericTest.cs index 927b45e960a..d81996228cc 100644 --- a/test/EFCore.Sqlite.FunctionalTests/ModelBuilding/SqliteModelBuilderGenericTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/ModelBuilding/SqliteModelBuilderGenericTest.cs @@ -6,56 +6,56 @@ namespace Microsoft.EntityFrameworkCore.ModelBuilding; public class SqliteModelBuilderGenericTest : SqliteModelBuilderTestBase { - public class SqlServerGenericNonRelationship(SqliteModelBuilderFixture fixture) : SqliteNonRelationship(fixture) + public class SqliteGenericNonRelationship(SqliteModelBuilderFixture fixture) : SqliteNonRelationship(fixture) { protected override TestModelBuilder CreateModelBuilder( Action? configure) => new GenericTestModelBuilder(Fixture, configure); } - public class SqlServerGenericComplexType(SqliteModelBuilderFixture fixture) : SqliteComplexType(fixture) + public class SqliteGenericComplexType(SqliteModelBuilderFixture fixture) : SqliteComplexType(fixture) { protected override TestModelBuilder CreateModelBuilder( Action? configure) => new GenericTestModelBuilder(Fixture, configure); } - public class SqlServerGenericInheritance(SqliteModelBuilderFixture fixture) : SqliteInheritance(fixture) + public class SqliteGenericInheritance(SqliteModelBuilderFixture fixture) : SqliteInheritance(fixture) { protected override TestModelBuilder CreateModelBuilder( Action? configure) => new GenericTestModelBuilder(Fixture, configure); } - public class SqlServerGenericOneToMany(SqliteModelBuilderFixture fixture) : SqliteOneToMany(fixture) + public class SqliteGenericOneToMany(SqliteModelBuilderFixture fixture) : SqliteOneToMany(fixture) { protected override TestModelBuilder CreateModelBuilder( Action? configure) => new GenericTestModelBuilder(Fixture, configure); } - public class SqlServerGenericManyToOne(SqliteModelBuilderFixture fixture) : SqliteManyToOne(fixture) + public class SqliteGenericManyToOne(SqliteModelBuilderFixture fixture) : SqliteManyToOne(fixture) { protected override TestModelBuilder CreateModelBuilder( Action? configure) => new GenericTestModelBuilder(Fixture, configure); } - public class SqlServerGenericOneToOne(SqliteModelBuilderFixture fixture) : SqliteOneToOne(fixture) + public class SqliteGenericOneToOne(SqliteModelBuilderFixture fixture) : SqliteOneToOne(fixture) { protected override TestModelBuilder CreateModelBuilder( Action? configure) => new GenericTestModelBuilder(Fixture, configure); } - public class SqlServerGenericManyToMany(SqliteModelBuilderFixture fixture) : SqliteManyToMany(fixture) + public class SqliteGenericManyToMany(SqliteModelBuilderFixture fixture) : SqliteManyToMany(fixture) { protected override TestModelBuilder CreateModelBuilder( Action? configure) => new GenericTestModelBuilder(Fixture, configure); } - public class SqlServerGenericOwnedTypes(SqliteModelBuilderFixture fixture) : SqliteOwnedTypes(fixture) + public class SqliteGenericOwnedTypes(SqliteModelBuilderFixture fixture) : SqliteOwnedTypes(fixture) { protected override TestModelBuilder CreateModelBuilder( Action? configure) diff --git a/test/EFCore.Sqlite.FunctionalTests/Update/JsonUpdateSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Update/JsonUpdateSqliteTest.cs index fd959fc2e3c..dbdc0f4e9af 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Update/JsonUpdateSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Update/JsonUpdateSqliteTest.cs @@ -536,7 +536,7 @@ public override async Task Edit_single_property_bool() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -559,7 +559,7 @@ public override async Task Edit_single_property_byte() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -581,7 +581,7 @@ public override async Task Edit_single_property_char() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -604,7 +604,7 @@ public override async Task Edit_single_property_datetime() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -627,7 +627,7 @@ public override async Task Edit_single_property_datetimeoffset() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -650,7 +650,7 @@ public override async Task Edit_single_property_decimal() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -673,7 +673,7 @@ public override async Task Edit_single_property_double() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -696,7 +696,7 @@ public override async Task Edit_single_property_guid() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -719,7 +719,7 @@ public override async Task Edit_single_property_int16() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -742,7 +742,7 @@ public override async Task Edit_single_property_int32() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -765,7 +765,7 @@ public override async Task Edit_single_property_int64() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -788,7 +788,7 @@ public override async Task Edit_single_property_signed_byte() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -811,7 +811,7 @@ public override async Task Edit_single_property_single() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -834,7 +834,7 @@ public override async Task Edit_single_property_timespan() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -857,7 +857,7 @@ public override async Task Edit_single_property_uint16() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -880,7 +880,7 @@ public override async Task Edit_single_property_uint32() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -903,7 +903,7 @@ public override async Task Edit_single_property_uint64() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -926,7 +926,7 @@ public override async Task Edit_single_property_nullable_int32() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -949,7 +949,7 @@ public override async Task Edit_single_property_nullable_int32_set_to_null() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -972,7 +972,7 @@ public override async Task Edit_single_property_enum() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -995,7 +995,7 @@ public override async Task Edit_single_property_enum_with_int_converter() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1018,7 +1018,7 @@ public override async Task Edit_single_property_nullable_enum() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1041,7 +1041,7 @@ public override async Task Edit_single_property_nullable_enum_set_to_null() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1064,7 +1064,7 @@ public override async Task Edit_single_property_nullable_enum_with_int_converter """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1087,7 +1087,7 @@ public override async Task Edit_single_property_nullable_enum_with_int_converter """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1110,7 +1110,7 @@ public override async Task Edit_single_property_nullable_enum_with_converter_tha """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1133,7 +1133,7 @@ public override async Task Edit_single_property_nullable_enum_with_converter_tha """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1146,8 +1146,8 @@ public override async Task Edit_two_properties_on_same_entity_updates_the_entire AssertSql( """ -@p0='{"TestBoolean":false,"TestBooleanCollection":[true,false],"TestByte":25,"TestByteCollection":null,"TestCharacter":"h","TestCharacterCollection":["A","B","\u0022"],"TestDateOnly":"2323-04-03","TestDateOnlyCollection":["3234-01-23","4331-01-21"],"TestDateTime":"2100-11-11 12:34:56","TestDateTimeCollection":["2000-01-01 12:34:56","3000-01-01 12:34:56"],"TestDateTimeOffset":"2200-11-11 12:34:56-05:00","TestDateTimeOffsetCollection":["2000-01-01 12:34:56-08:00"],"TestDecimal":"-123450.01","TestDecimalCollection":["-1234567890.01"],"TestDefaultString":"MyDefaultStringInCollection1","TestDefaultStringCollection":["S1","\u0022S2\u0022","S3"],"TestDouble":-1.2345,"TestDoubleCollection":[-1.23456789,1.23456789,0],"TestEnum":-1,"TestEnumCollection":[-1,-3,-7],"TestEnumWithIntConverter":2,"TestEnumWithIntConverterCollection":[-1,-3,-7],"TestGuid":"00000000-0000-0000-0000-000000000000","TestGuidCollection":["12345678-1234-4321-7777-987654321000"],"TestInt16":-12,"TestInt16Collection":[-32768,0,32767],"TestInt32":32,"TestInt32Collection":[-2147483648,0,2147483647],"TestInt64":64,"TestInt64Collection":[-9223372036854775808,0,9223372036854775807],"TestMaxLengthString":"Baz","TestMaxLengthStringCollection":["S1","S2","S3"],"TestNullableEnum":-1,"TestNullableEnumCollection":[-1,null,-3,-7],"TestNullableEnumWithConverterThatHandlesNulls":"Two","TestNullableEnumWithConverterThatHandlesNullsCollection":[-1,null,-7],"TestNullableEnumWithIntConverter":-3,"TestNullableEnumWithIntConverterCollection":[-1,null,-3,-7],"TestNullableInt32":90,"TestNullableInt32Collection":[null,-2147483648,0,null,2147483647,null],"TestSignedByte":-18,"TestSignedByteCollection":[-128,0,127],"TestSingle":-1.4,"TestSingleCollection":[-1.234,0,-1.234],"TestTimeOnly":"05:07:08.0000000","TestTimeOnlyCollection":["13:42:23.0000000","07:17:25.0000000"],"TestTimeSpan":"6:05:04.003","TestTimeSpanCollection":["10:09:08.007","-9:50:51.993"],"TestUnsignedInt16":12,"TestUnsignedInt16Collection":[0,0,65535],"TestUnsignedInt32":12345,"TestUnsignedInt32Collection":[0,0,4294967295],"TestUnsignedInt64":1234567867,"TestUnsignedInt64Collection":[0,0,18446744073709551615]}' (Nullable = false) (Size = 2143) -@p1='{"TestBoolean":true,"TestBooleanCollection":[true,false],"TestByte":255,"TestByteCollection":null,"TestCharacter":"a","TestCharacterCollection":["A","B","\u0022"],"TestDateOnly":"2023-10-10","TestDateOnlyCollection":["1234-01-23","4321-01-21"],"TestDateTime":"2000-01-01 12:34:56","TestDateTimeCollection":["2000-01-01 12:34:56","3000-01-01 12:34:56"],"TestDateTimeOffset":"2000-01-01 12:34:56-08:00","TestDateTimeOffsetCollection":["2000-01-01 12:34:56-08:00"],"TestDecimal":"-1234567890.01","TestDecimalCollection":["-1234567890.01"],"TestDefaultString":"MyDefaultStringInReference1","TestDefaultStringCollection":["S1","\u0022S2\u0022","S3"],"TestDouble":-1.23456789,"TestDoubleCollection":[-1.23456789,1.23456789,0],"TestEnum":-1,"TestEnumCollection":[-1,-3,-7],"TestEnumWithIntConverter":2,"TestEnumWithIntConverterCollection":[-1,-3,-7],"TestGuid":"12345678-1234-4321-7777-987654321000","TestGuidCollection":["12345678-1234-4321-7777-987654321000"],"TestInt16":-1234,"TestInt16Collection":[-32768,0,32767],"TestInt32":32,"TestInt32Collection":[-2147483648,0,2147483647],"TestInt64":64,"TestInt64Collection":[-9223372036854775808,0,9223372036854775807],"TestMaxLengthString":"Foo","TestMaxLengthStringCollection":["S1","S2","S3"],"TestNullableEnum":-1,"TestNullableEnumCollection":[-1,null,-3,-7],"TestNullableEnumWithConverterThatHandlesNulls":"Three","TestNullableEnumWithConverterThatHandlesNullsCollection":[-1,null,-7],"TestNullableEnumWithIntConverter":2,"TestNullableEnumWithIntConverterCollection":[-1,null,-3,-7],"TestNullableInt32":78,"TestNullableInt32Collection":[null,-2147483648,0,null,2147483647,null],"TestSignedByte":-128,"TestSignedByteCollection":[-128,0,127],"TestSingle":-1.234,"TestSingleCollection":[-1.234,0,-1.234],"TestTimeOnly":"11:12:13.0000000","TestTimeOnlyCollection":["11:42:23.0000000","07:17:27.0000000"],"TestTimeSpan":"10:09:08.007","TestTimeSpanCollection":["10:09:08.007","-9:50:51.993"],"TestUnsignedInt16":1234,"TestUnsignedInt16Collection":[0,0,65535],"TestUnsignedInt32":1234565789,"TestUnsignedInt32Collection":[0,0,4294967295],"TestUnsignedInt64":1234567890123456789,"TestUnsignedInt64Collection":[0,0,18446744073709551615]}' (Nullable = false) (Size = 2173) +@p0='{"TestBoolean":false,"TestBooleanCollection":[true,false],"TestBooleanCollectionCollection":[[true],null,[true,false]],"TestByte":25,"TestByteCollection":null,"TestCharacter":"h","TestCharacterCollection":["A","B","\u0022"],"TestCharacterCollectionCollection":[["A","B","C"],null,["D","E","F"]],"TestDateOnly":"2323-04-03","TestDateOnlyCollection":["3234-01-23","4331-01-21"],"TestDateTime":"2100-11-11 12:34:56","TestDateTimeCollection":["2000-01-01 12:34:56","3000-01-01 12:34:56"],"TestDateTimeOffset":"2200-11-11 12:34:56-05:00","TestDateTimeOffsetCollection":["2000-01-01 12:34:56-08:00"],"TestDecimal":"-123450.01","TestDecimalCollection":["-1234567890.01"],"TestDefaultString":"MyDefaultStringInCollection1","TestDefaultStringCollection":["S1","\u0022S2\u0022","S3"],"TestDefaultStringCollectionCollection":[["S11","S12","S13"],null,["S21",null,"S23"]],"TestDouble":-1.2345,"TestDoubleCollection":[-1.23456789,1.23456789,0],"TestDoubleCollectionCollection":[[-1.23456789,-1.23456789],null,[1.23456789]],"TestEnum":-1,"TestEnumCollection":[-1,-3,-7],"TestEnumWithIntConverter":2,"TestEnumWithIntConverterCollection":[-1,-3,-7],"TestGuid":"00000000-0000-0000-0000-000000000000","TestGuidCollection":["12345678-1234-4321-7777-987654321000"],"TestInt16":-12,"TestInt16Collection":[-32768,0,32767],"TestInt16CollectionCollection":[[-32768,0,32767],null,[-32768,0,32767]],"TestInt32":32,"TestInt32Collection":[-2147483648,0,2147483647],"TestInt32CollectionCollection":[[-2147483648,0,2147483647],null,[-2147483648,0,2147483647]],"TestInt64":64,"TestInt64Collection":[-9223372036854775808,0,9223372036854775807],"TestInt64CollectionCollection":[[-9223372036854775808,0,9223372036854775807],null,[-9223372036854775808,0,9223372036854775807]],"TestMaxLengthString":"Baz","TestMaxLengthStringCollection":["S1","S2","S3"],"TestMaxLengthStringCollectionCollection":[["S11","S12","S13"],null,["S21",null,"S23"]],"TestNullableEnum":-1,"TestNullableEnumCollection":[-1,null,-3,-7],"TestNullableEnumCollectionCollection":[[null,[-1,null,-3,-7],null,[-1,null,-3,-7]],null],"TestNullableEnumWithConverterThatHandlesNulls":"Two","TestNullableEnumWithConverterThatHandlesNullsCollection":[-1,null,-7],"TestNullableEnumWithIntConverter":-3,"TestNullableEnumWithIntConverterCollection":[-1,null,-3,-7],"TestNullableEnumWithIntConverterCollectionCollection":[[null,[-1,null,-3,-7],null,[-1,null,-3,-7]],null],"TestNullableInt32":90,"TestNullableInt32Collection":[null,-2147483648,0,null,2147483647,null],"TestNullableInt32CollectionCollection":[null,[-2147483648,null,2147483647,null],null,[-2147483648,0,2147483647]],"TestSignedByte":-18,"TestSignedByteCollection":[-128,0,127],"TestSingle":-1.4,"TestSingleCollection":[-1.234,0,-1.234],"TestSingleCollectionCollection":[[-1.234,0,-1.234],null,[-1.234,0,-1.234]],"TestTimeOnly":"05:07:08.0000000","TestTimeOnlyCollection":["13:42:23.0000000","07:17:25.0000000"],"TestTimeSpan":"6:05:04.003","TestTimeSpanCollection":["10:09:08.007","-9:50:51.993"],"TestUnsignedInt16":12,"TestUnsignedInt16Collection":[0,0,65535],"TestUnsignedInt32":12345,"TestUnsignedInt32Collection":[0,0,4294967295],"TestUnsignedInt64":1234567867,"TestUnsignedInt64Collection":[0,0,18446744073709551615]}' (Nullable = false) (Size = 3209) +@p1='{"TestBoolean":true,"TestBooleanCollection":[true,false],"TestBooleanCollectionCollection":[[true],null,[true,false]],"TestByte":255,"TestByteCollection":null,"TestCharacter":"a","TestCharacterCollection":["A","B","\u0022"],"TestCharacterCollectionCollection":[["A","B","C"],null,["D","E","F"]],"TestDateOnly":"2023-10-10","TestDateOnlyCollection":["1234-01-23","4321-01-21"],"TestDateTime":"2000-01-01 12:34:56","TestDateTimeCollection":["2000-01-01 12:34:56","3000-01-01 12:34:56"],"TestDateTimeOffset":"2000-01-01 12:34:56-08:00","TestDateTimeOffsetCollection":["2000-01-01 12:34:56-08:00"],"TestDecimal":"-1234567890.01","TestDecimalCollection":["-1234567890.01"],"TestDefaultString":"MyDefaultStringInReference1","TestDefaultStringCollection":["S1","\u0022S2\u0022","S3"],"TestDefaultStringCollectionCollection":[["S11","S12","S13"],null,["S21",null,"S23"]],"TestDouble":-1.23456789,"TestDoubleCollection":[-1.23456789,1.23456789,0],"TestDoubleCollectionCollection":[[-1.23456789,-1.23456789],null,[1.23456789]],"TestEnum":-1,"TestEnumCollection":[-1,-3,-7],"TestEnumWithIntConverter":2,"TestEnumWithIntConverterCollection":[-1,-3,-7],"TestGuid":"12345678-1234-4321-7777-987654321000","TestGuidCollection":["12345678-1234-4321-7777-987654321000"],"TestInt16":-1234,"TestInt16Collection":[-32768,0,32767],"TestInt16CollectionCollection":[[-32768,0,32767],null,[-32768,0,32767]],"TestInt32":32,"TestInt32Collection":[-2147483648,0,2147483647],"TestInt32CollectionCollection":[[-2147483648,0,2147483647],null,[-2147483648,0,2147483647]],"TestInt64":64,"TestInt64Collection":[-9223372036854775808,0,9223372036854775807],"TestInt64CollectionCollection":[[-9223372036854775808,0,9223372036854775807],null,[-9223372036854775808,0,9223372036854775807]],"TestMaxLengthString":"Foo","TestMaxLengthStringCollection":["S1","S2","S3"],"TestMaxLengthStringCollectionCollection":[["S11","S12","S13"],null,["S21",null,"S23"]],"TestNullableEnum":-1,"TestNullableEnumCollection":[-1,null,-3,-7],"TestNullableEnumCollectionCollection":[[null,[-1,null,-3,-7],null,[-1,null,-3,-7]],null],"TestNullableEnumWithConverterThatHandlesNulls":"Three","TestNullableEnumWithConverterThatHandlesNullsCollection":[-1,null,-7],"TestNullableEnumWithIntConverter":2,"TestNullableEnumWithIntConverterCollection":[-1,null,-3,-7],"TestNullableEnumWithIntConverterCollectionCollection":[[null,[-1,null,-3,-7],null,[-1,null,-3,-7]],null],"TestNullableInt32":78,"TestNullableInt32Collection":[null,-2147483648,0,null,2147483647,null],"TestNullableInt32CollectionCollection":[null,[-2147483648,null,2147483647,null],null,[-2147483648,0,2147483647]],"TestSignedByte":-128,"TestSignedByteCollection":[-128,0,127],"TestSingle":-1.234,"TestSingleCollection":[-1.234,0,-1.234],"TestSingleCollectionCollection":[[-1.234,0,-1.234],null,[-1.234,0,-1.234]],"TestTimeOnly":"11:12:13.0000000","TestTimeOnlyCollection":["11:42:23.0000000","07:17:27.0000000"],"TestTimeSpan":"10:09:08.007","TestTimeSpanCollection":["10:09:08.007","-9:50:51.993"],"TestUnsignedInt16":1234,"TestUnsignedInt16Collection":[0,0,65535],"TestUnsignedInt32":1234565789,"TestUnsignedInt32Collection":[0,0,4294967295],"TestUnsignedInt64":1234567890123456789,"TestUnsignedInt64Collection":[0,0,18446744073709551615]}' (Nullable = false) (Size = 3239) @p2='1' UPDATE "JsonEntitiesAllTypes" SET "Collection" = json_set("Collection", '$[0]', json(@p0)), "Reference" = @p1 @@ -1156,7 +1156,7 @@ public override async Task Edit_two_properties_on_same_entity_updates_the_entire """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1396,7 +1396,7 @@ public override async Task Edit_single_property_collection_of_bool() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1419,7 +1419,7 @@ public override async Task Edit_single_property_collection_of_byte() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1442,7 +1442,7 @@ public override async Task Edit_single_property_collection_of_char() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1465,7 +1465,7 @@ public override async Task Edit_single_property_collection_of_datetime() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1488,7 +1488,7 @@ public override async Task Edit_single_property_collection_of_datetimeoffset() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1510,7 +1510,7 @@ public override async Task Edit_single_property_collection_of_decimal() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1533,7 +1533,7 @@ public override async Task Edit_single_property_collection_of_double() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1555,7 +1555,7 @@ public override async Task Edit_single_property_collection_of_guid() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1577,7 +1577,7 @@ public override async Task Edit_single_property_collection_of_int16() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1599,7 +1599,7 @@ public override async Task Edit_single_property_collection_of_int32() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1622,7 +1622,7 @@ public override async Task Edit_single_property_collection_of_int64() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1645,7 +1645,7 @@ public override async Task Edit_single_property_collection_of_signed_byte() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1668,7 +1668,7 @@ public override async Task Edit_single_property_collection_of_single() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1690,7 +1690,7 @@ public override async Task Edit_single_property_collection_of_timespan() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1713,7 +1713,7 @@ public override async Task Edit_single_property_collection_of_dateonly() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1736,7 +1736,7 @@ public override async Task Edit_single_property_collection_of_timeonly() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1759,7 +1759,7 @@ public override async Task Edit_single_property_collection_of_uint16() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1782,7 +1782,7 @@ public override async Task Edit_single_property_collection_of_uint32() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1805,7 +1805,7 @@ public override async Task Edit_single_property_collection_of_uint64() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1828,7 +1828,7 @@ public override async Task Edit_single_property_collection_of_nullable_int32() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1851,7 +1851,7 @@ public override async Task Edit_single_property_collection_of_nullable_int32_set """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1874,7 +1874,7 @@ public override async Task Edit_single_property_collection_of_enum() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1897,7 +1897,7 @@ public override async Task Edit_single_property_collection_of_enum_with_int_conv """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1920,7 +1920,7 @@ public override async Task Edit_single_property_collection_of_nullable_enum() """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1943,7 +1943,7 @@ public override async Task Edit_single_property_collection_of_nullable_enum_set_ """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1966,7 +1966,7 @@ public override async Task Edit_single_property_collection_of_nullable_enum_with """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -1989,7 +1989,7 @@ public override async Task Edit_single_property_collection_of_nullable_enum_with """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -2012,7 +2012,7 @@ public override async Task Edit_single_property_collection_of_nullable_enum_with """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -2034,7 +2034,7 @@ public override async Task Edit_single_property_collection_of_nullable_enum_with """, // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 1 LIMIT 2 @@ -2295,9 +2295,9 @@ public override async Task Add_and_update_nested_optional_primitive_collection(b string parameterSize = value switch { - true => "1541", - false => "1538", - _ => "1540" + true => "2050", + false => "2047", + _ => "2049" }; string updateParameter = value switch @@ -2308,11 +2308,11 @@ public override async Task Add_and_update_nested_optional_primitive_collection(b }; AssertSql( - @"@p0='[{""TestBoolean"":false,""TestBooleanCollection"":[],""TestByte"":0,""TestByteCollection"":null,""TestCharacter"":""\u0000"",""TestCharacterCollection"":" + characterCollection + @",""TestDateOnly"":""0001-01-01"",""TestDateOnlyCollection"":[],""TestDateTime"":""0001-01-01 00:00:00"",""TestDateTimeCollection"":[],""TestDateTimeOffset"":""0001-01-01 00:00:00+00:00"",""TestDateTimeOffsetCollection"":[],""TestDecimal"":""0.0"",""TestDecimalCollection"":[],""TestDefaultString"":null,""TestDefaultStringCollection"":[],""TestDouble"":0,""TestDoubleCollection"":[],""TestEnum"":0,""TestEnumCollection"":[],""TestEnumWithIntConverter"":0,""TestEnumWithIntConverterCollection"":[],""TestGuid"":""00000000-0000-0000-0000-000000000000"",""TestGuidCollection"":[],""TestInt16"":0,""TestInt16Collection"":[],""TestInt32"":0,""TestInt32Collection"":[],""TestInt64"":0,""TestInt64Collection"":[],""TestMaxLengthString"":null,""TestMaxLengthStringCollection"":[],""TestNullableEnum"":null,""TestNullableEnumCollection"":[],""TestNullableEnumWithConverterThatHandlesNulls"":null,""TestNullableEnumWithConverterThatHandlesNullsCollection"":[],""TestNullableEnumWithIntConverter"":null,""TestNullableEnumWithIntConverterCollection"":[],""TestNullableInt32"":null,""TestNullableInt32Collection"":[],""TestSignedByte"":0,""TestSignedByteCollection"":[],""TestSingle"":0,""TestSingleCollection"":[],""TestTimeOnly"":""00:00:00.0000000"",""TestTimeOnlyCollection"":[],""TestTimeSpan"":""0:00:00"",""TestTimeSpanCollection"":[],""TestUnsignedInt16"":0,""TestUnsignedInt16Collection"":[],""TestUnsignedInt32"":0,""TestUnsignedInt32Collection"":[],""TestUnsignedInt64"":0,""TestUnsignedInt64Collection"":[]}]' (Nullable = false) (Size = " + parameterSize + @") + @"@p0='[{""TestBoolean"":false,""TestBooleanCollection"":[],""TestBooleanCollectionCollection"":[],""TestByte"":0,""TestByteCollection"":null,""TestCharacter"":""\u0000"",""TestCharacterCollection"":" + characterCollection + @",""TestCharacterCollectionCollection"":[],""TestDateOnly"":""0001-01-01"",""TestDateOnlyCollection"":[],""TestDateTime"":""0001-01-01 00:00:00"",""TestDateTimeCollection"":[],""TestDateTimeOffset"":""0001-01-01 00:00:00+00:00"",""TestDateTimeOffsetCollection"":[],""TestDecimal"":""0.0"",""TestDecimalCollection"":[],""TestDefaultString"":null,""TestDefaultStringCollection"":[],""TestDefaultStringCollectionCollection"":null,""TestDouble"":0,""TestDoubleCollection"":[],""TestDoubleCollectionCollection"":[],""TestEnum"":0,""TestEnumCollection"":[],""TestEnumWithIntConverter"":0,""TestEnumWithIntConverterCollection"":[],""TestGuid"":""00000000-0000-0000-0000-000000000000"",""TestGuidCollection"":[],""TestInt16"":0,""TestInt16Collection"":[],""TestInt16CollectionCollection"":null,""TestInt32"":0,""TestInt32Collection"":[],""TestInt32CollectionCollection"":[],""TestInt64"":0,""TestInt64Collection"":[],""TestInt64CollectionCollection"":[],""TestMaxLengthString"":null,""TestMaxLengthStringCollection"":[],""TestMaxLengthStringCollectionCollection"":null,""TestNullableEnum"":null,""TestNullableEnumCollection"":[],""TestNullableEnumCollectionCollection"":[],""TestNullableEnumWithConverterThatHandlesNulls"":null,""TestNullableEnumWithConverterThatHandlesNullsCollection"":[],""TestNullableEnumWithIntConverter"":null,""TestNullableEnumWithIntConverterCollection"":[],""TestNullableEnumWithIntConverterCollectionCollection"":[[[-3]]],""TestNullableInt32"":null,""TestNullableInt32Collection"":[],""TestNullableInt32CollectionCollection"":[[99]],""TestSignedByte"":0,""TestSignedByteCollection"":[],""TestSingle"":0,""TestSingleCollection"":[],""TestSingleCollectionCollection"":[[1.1,1.2]],""TestTimeOnly"":""00:00:00.0000000"",""TestTimeOnlyCollection"":[],""TestTimeSpan"":""0:00:00"",""TestTimeSpanCollection"":[],""TestUnsignedInt16"":0,""TestUnsignedInt16Collection"":[],""TestUnsignedInt32"":0,""TestUnsignedInt32Collection"":[],""TestUnsignedInt64"":0,""TestUnsignedInt64Collection"":[]}]' (Nullable = false) (Size = " + parameterSize + @") @p1='7624' @p2='[]' (Size = 2) -@p3=NULL (DbType = Binary) -@p4='[]' (Size = 2) +@p3='[]' (Size = 2) +@p4=NULL (DbType = Binary) @p5='[]' (Size = 2) @p6='[]' (Size = 2) @p7='[]' (Size = 2) @@ -2320,11 +2320,11 @@ public override async Task Add_and_update_nested_optional_primitive_collection(b @p9='[]' (Size = 2) @p10='[]' (Size = 2) @p11='[]' (Size = 2) -@p12='[]' (Nullable = false) (Size = 2) +@p12='[]' (Size = 2) @p13='[]' (Size = 2) @p14='[]' (Size = 2) @p15='[]' (Size = 2) -@p16='[]' (Size = 2) +@p16='[]' (Nullable = false) (Size = 2) @p17='[]' (Size = 2) @p18='[]' (Size = 2) @p19='[]' (Size = 2) @@ -2335,27 +2335,38 @@ public override async Task Add_and_update_nested_optional_primitive_collection(b @p24='[]' (Size = 2) @p25='[]' (Size = 2) @p26='[]' (Size = 2) - -INSERT INTO ""JsonEntitiesAllTypes"" (""Collection"", ""Id"", ""TestBooleanCollection"", ""TestByteCollection"", ""TestCharacterCollection"", ""TestDateTimeCollection"", ""TestDateTimeOffsetCollection"", ""TestDecimalCollection"", ""TestDefaultStringCollection"", ""TestDoubleCollection"", ""TestEnumCollection"", ""TestEnumWithIntConverterCollection"", ""TestGuidCollection"", ""TestInt16Collection"", ""TestInt32Collection"", ""TestInt64Collection"", ""TestMaxLengthStringCollection"", ""TestNullableEnumCollection"", ""TestNullableEnumWithConverterThatHandlesNullsCollection"", ""TestNullableEnumWithIntConverterCollection"", ""TestNullableInt32Collection"", ""TestSignedByteCollection"", ""TestSingleCollection"", ""TestTimeSpanCollection"", ""TestUnsignedInt16Collection"", ""TestUnsignedInt32Collection"", ""TestUnsignedInt64Collection"") -VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23, @p24, @p25, @p26);", +@p27=NULL +@p28='[]' (Size = 2) +@p29='[]' (Size = 2) +@p30='[]' (Size = 2) +@p31='[]' (Size = 2) +@p32='[]' (Size = 2) +@p33='[]' (Size = 2) +@p34='[]' (Size = 2) +@p35='[]' (Size = 2) +@p36='[]' (Size = 2) +@p37='[]' (Size = 2) +@p38='[]' (Size = 2) + +INSERT INTO ""JsonEntitiesAllTypes"" (""Collection"", ""Id"", ""TestBooleanCollection"", ""TestBooleanCollectionCollection"", ""TestByteCollection"", ""TestCharacterCollection"", ""TestCharacterCollectionCollection"", ""TestDateTimeCollection"", ""TestDateTimeOffsetCollection"", ""TestDecimalCollection"", ""TestDefaultStringCollection"", ""TestDefaultStringCollectionCollection"", ""TestDoubleCollection"", ""TestDoubleCollectionCollection"", ""TestEnumCollection"", ""TestEnumWithIntConverterCollection"", ""TestGuidCollection"", ""TestInt16Collection"", ""TestInt16CollectionCollection"", ""TestInt32Collection"", ""TestInt32CollectionCollection"", ""TestInt64Collection"", ""TestInt64CollectionCollection"", ""TestMaxLengthStringCollection"", ""TestMaxLengthStringCollectionCollection"", ""TestNullableEnumCollection"", ""TestNullableEnumCollectionCollection"", ""TestNullableEnumWithConverterThatHandlesNullsCollection"", ""TestNullableEnumWithIntConverterCollection"", ""TestNullableEnumWithIntConverterCollectionCollection"", ""TestNullableInt32Collection"", ""TestNullableInt32CollectionCollection"", ""TestSignedByteCollection"", ""TestSingleCollection"", ""TestSingleCollectionCollection"", ""TestTimeSpanCollection"", ""TestUnsignedInt16Collection"", ""TestUnsignedInt32Collection"", ""TestUnsignedInt64Collection"") +VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23, @p24, @p25, @p26, @p27, @p28, @p29, @p30, @p31, @p32, @p33, @p34, @p35, @p36, @p37, @p38);", // """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 7624 LIMIT 2 """, -// - -"@p0=" + updateParameter + @" + // + "@p0=" + updateParameter + @" @p1='7624' UPDATE ""JsonEntitiesAllTypes"" SET ""Collection"" = json_set(""Collection"", '$[0].TestCharacterCollection', json(@p0)) WHERE ""Id"" = @p1 RETURNING 1;", - // - """ -SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDoubleCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt32Collection", "j"."TestInt64Collection", "j"."TestMaxLengthStringCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableInt32Collection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" + // + """ +SELECT "j"."Id", "j"."TestBooleanCollection", "j"."TestBooleanCollectionCollection", "j"."TestByteCollection", "j"."TestCharacterCollection", "j"."TestCharacterCollectionCollection", "j"."TestDateTimeCollection", "j"."TestDateTimeOffsetCollection", "j"."TestDecimalCollection", "j"."TestDefaultStringCollection", "j"."TestDefaultStringCollectionCollection", "j"."TestDoubleCollection", "j"."TestDoubleCollectionCollection", "j"."TestEnumCollection", "j"."TestEnumWithIntConverterCollection", "j"."TestGuidCollection", "j"."TestInt16Collection", "j"."TestInt16CollectionCollection", "j"."TestInt32Collection", "j"."TestInt32CollectionCollection", "j"."TestInt64Collection", "j"."TestInt64CollectionCollection", "j"."TestMaxLengthStringCollection", "j"."TestMaxLengthStringCollectionCollection", "j"."TestNullableEnumCollection", "j"."TestNullableEnumCollectionCollection", "j"."TestNullableEnumWithConverterThatHandlesNullsCollection", "j"."TestNullableEnumWithIntConverterCollection", "j"."TestNullableEnumWithIntConverterCollectionCollection", "j"."TestNullableInt32Collection", "j"."TestNullableInt32CollectionCollection", "j"."TestSignedByteCollection", "j"."TestSingleCollection", "j"."TestSingleCollectionCollection", "j"."TestTimeSpanCollection", "j"."TestUnsignedInt16Collection", "j"."TestUnsignedInt32Collection", "j"."TestUnsignedInt64Collection", "j"."Collection", "j"."Reference" FROM "JsonEntitiesAllTypes" AS "j" WHERE "j"."Id" = 7624 LIMIT 2 diff --git a/test/EFCore.Tests/CollectionComparerTest.cs b/test/EFCore.Tests/CollectionComparerTest.cs index 9191d767fa6..00ba675298f 100644 --- a/test/EFCore.Tests/CollectionComparerTest.cs +++ b/test/EFCore.Tests/CollectionComparerTest.cs @@ -966,7 +966,7 @@ public void Can_detect_changes_to_primitive_collections_using_ObservableCollecti [ConditionalFact] public void List_comparer_throws_when_used_with_non_list() { - var comparer = new ListComparer(new ValueComparer(favorStructuralComparisons: false)); + var comparer = new ListOfReferenceTypesComparer, string>(new ValueComparer(favorStructuralComparisons: false)); Assert.Equal( CoreStrings.BadListType("HashSet", "IList"), @@ -984,7 +984,7 @@ public void List_comparer_throws_when_used_with_non_list() [ConditionalFact] public void Nullable_list_comparer_throws_when_used_with_non_list() { - var comparer = new NullableValueTypeListComparer(new ValueComparer(favorStructuralComparisons: false)); + var comparer = new ListOfNullableValueTypesComparer, int>(new ValueComparer(favorStructuralComparisons: false)); Assert.Equal( CoreStrings.BadListType("HashSet", "IList"), diff --git a/test/EFCore.Tests/Infrastructure/ModelValidatorTest.cs b/test/EFCore.Tests/Infrastructure/ModelValidatorTest.cs index 6967c5842da..a7fe5b17075 100644 --- a/test/EFCore.Tests/Infrastructure/ModelValidatorTest.cs +++ b/test/EFCore.Tests/Infrastructure/ModelValidatorTest.cs @@ -204,7 +204,7 @@ protected class WithStringCollection } [ConditionalFact] - public virtual void Throws_when_mapping_an_IReadOnlyCollection() + public virtual void Does_not_throw_when_mapping_an_IReadOnlyCollection() { var modelBuilder = CreateConventionModelBuilder(); @@ -215,9 +215,7 @@ public virtual void Throws_when_mapping_an_IReadOnlyCollection() eb.PrimitiveCollection(e => e.Tags); }); - VerifyError( - CoreStrings.ReadOnlyListType("IReadOnlyCollection"), - modelBuilder, sensitiveDataLoggingEnabled: false); + Validate(modelBuilder); } protected class WithReadOnlyCollection @@ -227,7 +225,7 @@ protected class WithReadOnlyCollection } [ConditionalFact] - public virtual void Throws_when_mapping_an_IReadOnlyList() + public virtual void Does_not_throw_when_mapping_an_IReadOnlyList() { var modelBuilder = CreateConventionModelBuilder(); @@ -238,9 +236,7 @@ public virtual void Throws_when_mapping_an_IReadOnlyList() eb.PrimitiveCollection(e => e.Tags); }); - VerifyError( - CoreStrings.ReadOnlyListType("IReadOnlyList"), - modelBuilder, sensitiveDataLoggingEnabled: false); + Validate(modelBuilder); } protected class WithReadOnlyList